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
Latest CPA-21-02 Practice Questions with 222 Q&As
Updated Study Material | Instant Download | Detailed Answers and Explanations
Subscribe
Login
0 Comments