Deal of The Day! 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 - C++ Certified Associate Programmer exam
Question #: 87
Topic #: 4
[All CPA - C++ Certified Associate Programmer 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
2 months ago
So combining them, the answer must be B) It prints 23.
upvoted 0 times
...
Richelle
3 months ago
And then PRINT(z) follows, which is 3.
upvoted 0 times
...
Rex
3 months ago
PRINT(y) should give 2, right?
upvoted 0 times
...
Elza
3 months ago
Yeah, so it should print the values of y and z.
upvoted 0 times
...
Richelle
3 months ago
Hmm, let's see. PRINT prints the value directly.
upvoted 0 times
...
Rex
4 months ago
What do you think about the output of the program?
upvoted 0 times
...

Save Cancel