What will be the output of the following program?
#include<stdio.h>
#define PRINT printf(\"\")
int main()
{
if (PRINT)
{
printf(\"True\");
}
else
{
printf(\"False\");
}
}
(A) True
(B) False
(C) No Output
(D) Error
Answer: (B)
Explanation: printf(\”\”) returns 0 as the number of characters printed which is equivalent to false.
Quiz of this Question
Share your thoughts in the comments
Please Login to comment...