edited by
775 views

2 Answers

1 votes
1 votes

Output is some random integer
ab is integer but foo(a,b) is string string + integer = God knows
Thing is    #define foo(a,b) #a     
means you are converting argument a into string   # here is stringify operator  
e.g : if u write  printf("%s",foo(ohyeah,b));
this will make a = ohyeah in  #define foo(a,b) #a    
and then #a  = #ohyeah    which means ohyeah is now a string which will replace foo(ohyeah,b)

I hope you got this if not lemme know :)

edited by
0 votes
0 votes
It should be a#b rather than #b acc to me.# is used to concatenate a & b.So it should be like 1015+20= 1035.Plz correct me if I am wrong.

Related questions

2 votes
2 votes
1 answer
1
3 votes
3 votes
2 answers
2
sunil sarode asked Nov 4, 2017
2,170 views
Choose the False statements:(a) The scope of a macro definition need not be the entire program(b) The scope of a macro definition extends from the point of definition to ...
0 votes
0 votes
1 answer
3
Hira Thakur asked Aug 18, 2017
1,691 views
how enum has differed from marco???what is advantage/disadvantage of both???