Macros

Q.

What is the output of this program?

1.
    #include 
2.
    using namespace std;
3.
    #define MAX 
4.
    int main()
5.
    {
6.
        int num;
7.
        num = ++MAX;
8.
        cout << num;
9.
        return 0;
10.
    }
A. 11
B. 10
C. compile time error
D. none of the mentioned

Answer : Option C

Explanation :

:Macro Preprocessor only replaces occurance of macro symbol with macro symbol value, 

So we can’t increment the value.