Sail E0 Webinar
Question

What is the output of this program?

#include < iostream >

using namespace std;

#define MAX 10

int main()

{

int num;

num = ++MAX;

cout

Options:
A .  11
B .  10
C .  compile time error
D .  none of the mentioned
Answer: Option C


Macro Preprocessor only replaces occurance of macro symbol with macro symbol value, So we can't increment the value.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :

Latest Videos

Latest Test Papers