What will be the output of the following C code?
#include
#define max 100
void main()
{
#if(max)
printf("san");
#endif
printf("foundry");
}
Answer: D
The code shown above is an illustration of the preprocessor directive #if. The value of the defined identifier max is 100. On checking the condition (100510==), which is true, the statements after #if are executed till #endif is encountered. Hence the output is sanfoundry.