New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

C++ Institute CPA-21-02 Exam - 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:

0/2000 characters
Miesha
3 months ago
Definitely not 123, that's just wrong.
upvoted 0 times
...
Maile
4 months ago
I think it should be 23 too, but why not 123?
upvoted 0 times
...
Lettie
4 months ago
Wait, are you sure? I thought it would print both values together.
upvoted 0 times
...
Alecia
4 months ago
Totally agree, it's just the two variables!
upvoted 0 times
...
Elinore
4 months ago
It prints: 23
upvoted 0 times
...
Aliza
5 months ago
I’m confused about the order of printing. Does it really print them one after the other without any space?
upvoted 0 times
...
Becky
5 months ago
I practiced a similar question where the output was combined. I feel like it should be both numbers together, so maybe 23?
upvoted 0 times
...
Altha
5 months ago
I'm not entirely sure, but I remember something about how macros work. Could it be just 2 or 3?
upvoted 0 times
...
Tandra
5 months ago
I think the output should be 23 since it prints y first and then z.
upvoted 0 times
...
Flo
5 months ago
I'm confident that the output will be 23. The PRINT macro is just printing the values of y and z, and those are set to 2 and 3, respectively.
upvoted 0 times
...
Mabel
5 months ago
I'm not sure about this one. I'll double-check the PRINT macro and make sure I understand how it's being used in the code.
upvoted 0 times
...
Nicolette
5 months ago
Okay, I think I've got it. The PRINT macro is just printing the value of the variables y and z, so the output should be 23.
upvoted 0 times
...
Ezekiel
5 months ago
I'm a bit confused by the PRINT macro. Does it just print the value of the variable, or is there something more going on?
upvoted 0 times
...
Lea
5 months ago
Hmm, this looks straightforward. I'll carefully read through the code and think about what the PRINT macro is doing.
upvoted 0 times
...
Bulah
5 months ago
Okay, let me break this down step-by-step. The key seems to be properly configuring the access-lists and class-maps to match the desired traffic types.
upvoted 0 times
...
Luis
5 months ago
D seems like the most likely answer to me. The developer must decide the ideal selection of attributes, Application Manager can't do that on its own.
upvoted 0 times
...
Graciela
5 months ago
I remember practicing similar questions, and I think "View, Interpret, and Act" could be right. It sounds familiar.
upvoted 0 times
...
Val
5 months ago
Ah, I remember learning about the Delphi technique in class. I think that's the one where a group of experts provide anonymous feedback. But I'm not 100% sure if that's the right answer for this question.
upvoted 0 times
...
Jarvis
5 months ago
This one seems pretty straightforward. I'm pretty confident the answer is B - Formal controls.
upvoted 0 times
...
Gary
6 months ago
Hmm, the options seem a bit vague. I'll need to dig deeper into the details of the stream to figure out the right answer.
upvoted 0 times
...
Whitley
10 months ago
I bet the answer is option D. The PRINT macro only prints the value of y, which is 2.
upvoted 0 times
Tashia
8 months ago
That's correct. The program will only print the value of y, which is 2.
upvoted 0 times
...
Roslyn
8 months ago
Yes, the macro only prints the value of y, so the output will be 2.
upvoted 0 times
...
Sharita
9 months ago
I think you're right. The macro only prints the value of y, which is 2.
upvoted 0 times
...
...
Aracelis
10 months 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
10 months 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
Sabra
9 months ago
So, the output is 23.
upvoted 0 times
...
Armando
10 months ago
Yes, that's correct. It prints the values of y and z.
upvoted 0 times
...
Mila
10 months ago
I think it prints: 23
upvoted 0 times
...
...
Teri
10 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
Dell
9 months ago
User3: So the answer is D) It prints: 2.
upvoted 0 times
...
Sena
9 months ago
User2: Correct, the PRINT macro just prints the individual values of y and z.
upvoted 0 times
...
Wynell
10 months ago
User1: I think the output will be 2 and 3.
upvoted 0 times
...
...
Ivan
11 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
11 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
11 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
11 months ago
I think the output is 23.
upvoted 0 times
...

Save Cancel