Open joesavage opened 8 years ago
The following snippet outputs '10' rather than the expected value of '1' due to the way macro expansion is handled incorrectly in the interpreter:
#include <stdio.h> #define NUM_ONE 0 #define NUM_TWO 1 #define NUM_THREE NUM_ONE + NUM_TWO int main(void) { printf("%d\n", 10 * NUM_THREE); return 0; }
The following snippet outputs '10' rather than the expected value of '1' due to the way macro expansion is handled incorrectly in the interpreter: