Question: Preprocessor Commands in C++: Note the code and preprocessor instructions in order to answer each question. What will the following code do? #define plus +
Preprocessor Commands in C++: Note the code and preprocessor instructions in order to answer each question.
What will the following code do?
#define plus + int main() { cout << (3 plus 5) << endl; }
| A. The program will compile, but immediately crash. |
| B. | The program will not compile because C++ expects there to be an operator between 3 and 5, not a variable name. |
| C. | The program will not compile because 'plus' is not a declared variable. |
| D. | The program will compile and print '8'. |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
