Will it result in to an error if a header file is included twice?
Answer : Option C
Unless the header file has taken care to ensure that if already included it doesn't
get included again.
Turbo C, GCC compilers would take care of these problems, generate no error.
Will the program compile successfully?
a = 10;
printf("%d`setminus`n" , a)'
Answer : Option A
Yes, this program will compile and run successfully and prints 20.
The macro #ifdef NOTE evaluates the given expression to 1. If satisfied it executes the
#ifdefblock statements. Here #ifdef condition fails because the Macro NOTE is nowhere declared.
Hence the #else block gets executed, the variable a is declared and assigned a value of 20.
printf("%dn", a); It prints the value of variable a 20.