C | Macro & Preprocessor | Question 12
Predict the output of following program?
#define MAX 1000
MAX = 100;
(C) Compiler Error
(D) Garbage Value
Explanation: After preprocessing stage of compilation, the function main() changes to following
int 1000 = 100; // COMPILER ERROR: expected unqualified-id before numeric constant
printf("%d ", 1000);
Quiz of this Question
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.