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

Save Cancel