Ex 10: #define max 5 #define a max*max #define value a\a void main() { const int aa=5; printf("%d",value+aa); }
What will be output if you compile and execute the above code?
(a)5 (b)6 (c)10 (d)Compiler error
Ans: (c)
Ex - 11: #define function(a,b) a##b void main() { printf("%d",function(5,2)); }
(a)10 (b)2 (c)52 (d)Compiler error
Ex - 12: #define find(a,b,c) #a#b#c void main() { int a=10; int b=20; int c=30; printf("%s",find(a,b,c)+1); }
(a)102030 (b)02030 (c)bc (d)Compiler error