What happens when you attempt to compile and run the following code?

What happens when you attempt to compile and run the following code?

#include <iostream>

using namespace std;

#define DEF_A 0

#define DEF_B DEF_A+1

#define DEF_C DEF_B+1

int main(int argc, char *argv[]) {

cout << DEF_C;

return 0;

}
A . It prints: 2
B . It prints: 10
C . It prints: 0
D . It prints: 1

Answer: A

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments