Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

C++ Institute Exam CPA Topic 4 Question 87 Discussion

Actual exam question for C++ Institute's CPA exam
Question #: 87
Topic #: 4
[All CPA Questions]

What is the output of the program?

#include

using namespace std;

#define PRINT(i) cout<

int main()

{

int y=2, z=3;

PRINT(y);

PRINT(z);

return 0;

}

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Elza
6 months ago
So combining them, the answer must be B) It prints 23.
upvoted 0 times
...
Richelle
6 months ago
And then PRINT(z) follows, which is 3.
upvoted 0 times
...
Rex
6 months ago
PRINT(y) should give 2, right?
upvoted 0 times
...
Elza
6 months ago
Yeah, so it should print the values of y and z.
upvoted 0 times
...
Richelle
7 months ago
Hmm, let's see. PRINT prints the value directly.
upvoted 0 times
...
Rex
7 months ago
What do you think about the output of the program?
upvoted 0 times
...

Save Cancel