Cyber Monday 2023! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: CM25OFF
Welcome to Pass4Success

- Free Preparation Discussions

C++ Institute Exam CPA Topic 8 Question 58 Discussion

Actual exam question for C++ Institute's CPA - C++ Certified Associate Programmer exam
Question #: 58
Topic #: 8
[All CPA - C++ Certified Associate Programmer Questions]

What is the output of the program?



using namespace std;

class First


string name;


First() {

name = "Alan";


void setName(string n) {this?>name = n;}

void setName() {this?>name = "John";}

void Print(){

cout << name;



int main()


First ob1,*ob2;

ob2 = new First();

First *t;

t = &ob1;



t = ob2;




Show Suggested Answer Hide Answer
Suggested Answer: A


Currently there are no comments in this discussion, be the first to comment!

Save Cancel