C | Macro & Preprocessor | Question 5
#define ISEQUAL(X, Y) X == Y
#if ISEQUAL(X, 0)
Output of the above program?
(C) Any of Geeks or Quiz
(D) Compile time error
Explanation: The conditional macro #if ISEQUAL(X, 0) is expanded to #if X == 0. After the pre-processing is over, all the undefined macros are initialized with default value 0. Since macro X has not been defined, it is initialized with 0. So, Geeks is printed.
Attention reader! Don’t stop learning now. Get hold of all the important C++ Foundation and STL concepts with the C++ Foundation and STL courses at a student-friendly price and become industry ready.