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-21-02 Topic 1 Question 10 Discussion

Actual exam question for C++ Institute's CPA-21-02 exam
Question #: 10
Topic #: 1
[All CPA-21-02 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: A, B

Contribute your Thoughts:

Whitley
22 days ago
I bet the answer is option D. The PRINT macro only prints the value of y, which is 2.
upvoted 0 times
...
Aracelis
25 days ago
Haha, the trick here is that the PRINT macro doesn't have any formatting, so it just prints the raw values. Easy peasy!
upvoted 0 times
...
Tamesha
26 days ago
I'm going to go with option B. The PRINT macro simply prints the values of y and z one after the other.
upvoted 0 times
Armando
18 days ago
Yes, that's correct. It prints the values of y and z.
upvoted 0 times
...
Mila
19 days ago
I think it prints: 23
upvoted 0 times
...
...
Teri
1 months ago
Hmm, I think the output will be 2 and 3, since the PRINT macro just prints the individual values of y and z.
upvoted 0 times
Wynell
13 days ago
User1: I think the output will be 2 and 3.
upvoted 0 times
...
...
Ivan
1 months ago
The output should be 23, as the PRINT macro simply concatenates the values of y and z without any additional formatting.
upvoted 0 times
...
Nadine
2 months ago
I'm not sure, but I think it prints 23 as well. The PRINT macro just concatenates the values without any space.
upvoted 0 times
...
Thora
2 months ago
I agree with Arletta, it prints 23 because the PRINT macro is used to print the values of y and z.
upvoted 0 times
...
Arletta
2 months ago
I think the output is 23.
upvoted 0 times
...

Save Cancel