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 CPA-21-02 Exam - Topic 2 Question 61 Discussion

Posted by Norah on Oct 16, 2026 at 04:14 AM

What happens when you attempt to compile and run the following code?

#include

using namespace std;

class Test {

float i,j;

};

class Add {

public:

int x,y;

Add (int a=3, int b=3) { x=a; y=b; }

int result() { return x+y;}

};

int main () {

Test test;

Add * padd;

padd = &test;

cout << padd?>result();

return 0;

}

Suggested Answer: C

Get Premium CPA-21-02 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
1 comments · newest first
VE
Vesta 1 day ago
I think there's a compilation error because `padd` is a pointer to `Add`, but it's being assigned an instance of `Test`.
0/2000 characters

Save Cancel