Question: #define INSTRUCTOR_FILE #ifdef INSTRUCTOR_FILE #include #include void TestDeclarations(); int main() { TestDeclarations(); std::cout C2A3E2 (4 points - C++ Program) Exclude any existing source code files
#define INSTRUCTOR_FILE #ifdef INSTRUCTOR_FILE
#include
void TestDeclarations();
int main() { TestDeclarations(); std::cout C2A3E2 (4 points - C++ Program) Exclude any existing source code files that may already be in your IDE project and add a new one. C2A3E2_main-Driver.cpp. Do not write o main function main already exists in the instructor-supplied file and it will use the code you write. This exercise: Requires absolutely no knowledge of what the data types being described actually mean: Is trivial if you understand notes 13.2-13.3B and can be extremely difficult if you don't The Reverse Right-Left rule (notes 13.3A & 13.3B) is used to convert meaningful English sentences that describe standard C and C++ declarations and type casts into code. For example. a sentence that reads test is an int gets coded as int test; a sentence that reads This is a C-style type cast to a pointer to a double. gets coded as (double *) and can be used with the syntax (double *)test File C2A3E2_TestDeclarations.cpp must contain a function named TestDeclarations. TestDeclarations syntax: void TestDeclarations(); Parameters: none Synopsis: Contains exactly five single statements in order that do the following. Only initialize if so stated: 1. Declares ap to be "a pointer to an array of 6 doubles" and initializes it to as part of the declaration 2. Declares bce to be "a pointer to a pointer to an array of 6 pointers to long longs". 3. Type casts (C-style) ap to "a pointer to a pointer to an array of 6 pointers to long longs" and assigns the result to bce. 4. Declares rf2 to be "a function returning a reference to a long" that has a parameter named delay that's "a pointer to an unsigned int". 5. Declares al to be "a reference to a pointer to an array of 6 doubles" and initializes it to ap as part of the declaration. Return: void . Place the comment // 1. or // 2. or // 3. or // 4. or // 5. as appropriate on the same line as each statement to indicate which of the above it represents. Place no other comments in the code. Ignore any "unreferenced" symbol/variable warnings from your compiler, but not from the assignment checker. DO NOT Use any unnecessary parentheses
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
