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 CPP Topic 6 Question 54 Discussion

Actual exam question for C++ Institute's CPP - C++ Certified Professional Programmer exam
Question #: 54
Topic #: 6
[All CPP - C++ Certified Professional Programmer Questions]

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



using namespace std;

class A


int a,b;


A & operator =(const A & c) { a = c.a; return *this;}


void setA(int a) {this?>a = a;} void setB(int b) {this?>b = b;}

int getA() {return a;} int getB() {return b;}


int main ()



A a;

a.setA(10); a.setB(11);


A b = v.front(); v.pop_back();


return 0;


Show Suggested Answer Hide Answer
Suggested Answer: A


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

Save Cancel