What will be the output of the following C code?
#include
#define max 100
main()
{
#ifdef max
printf("hello");
}
Answer: D
The code shown above results in an error. This is because the preprocessor #endif is missing in the above code. If the identifier is defined, then the statements following #ifdef are executed till #endif is encountered.