AD1

Tuesday, 25 April 2017

Find the output of the following code

Output
20
C is sea

Explanation
in this question I introduce the concept of preprocessor operators 
concat(x,y) x##y this operator concatenate x and y 
string(a) #a #operator convert any macro constant into string
so after preprocessing this code you will have the following code

int myvar=20;
printf("%d\n",myvar);
printf("%s","C is sea");


No comments:

Post a Comment