Sail E0 Webinar
Question


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
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 *

Latest Videos

Latest Test Papers