Ex 1:
#define float char void main() { float f=255; printf("%d",sizeof(f++)); }
What will be output if you compile and execute the above code?
(a)1 (b)2 (c)8 (d)Compiler error
Ans: (a)
Ex - 2: void main() { char f=255.0; printf("%d",sizeof(f++)); }
(a)1 (b)8 (c)10 (d)Compiler error
Ex - 3: #define value 10\2 void main() { printf("%d",value); }
(a)5 (b)20 (c)102 (d)Compiler error
Ans: (c)