Month End Sale 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

Note! Following CPA Exam is Retired now. Please select the alternative replacement for your Exam Certification. The new exam code is CPA-21-02
Last Week Results
32 Customers Passed C++ Institute
CPA Exam
Average Score In Real Exam
86.7%
Questions came word for word from this dump
88.6%
C++ Institute Bundle Exams
C++ Institute Bundle Exams
 Duration: 3 to 12 Months
 3 Certifications
  7 Exams
 C++ Institute Updated Exams
 Most authenticate information
 Prepare within Days
 Time-Saving Study Content
 90 to 365 days Free Update
$249.6*
Free CPA Exam Dumps

Verified By IT Certified Experts

CertsTopics.com Certified Safe Files

Up-To-Date Exam Study Material

99.5% High Success Pass Rate

100% Accurate Answers

Instant Downloads

Exam Questions And Answers PDF

Try Demo Before You Buy

Certification Exams with Helpful Questions And Answers

C++ Certified Associate Programmer Questions and Answers

Question 1

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

#include

#include

using namespace std;

class A {

int x;

protected:

int y;

public:

int z;

A() { x=1; y=2; z=3; }

};

class B : public A {

string z;

public:

void set() { y = 4; z = "John"; }

void Print() { cout << y << A::z; }

};

int main () {

B b;

b.set();

b.Print();

return 0;

}

Options:

A.

It prints: 4John

B.

It prints: 2John

C.

It prints: 23

D.

It prints: 43

Buy Now
Question 2

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

#include

using namespace std;

class First

{

public:

void Print(){ cout<<"from First";}

};

class Second:public First

{

public:

void Print(){ cout<< "from Second";}

};

void fun(First *obj);

int main()

{

First FirstObject;

fun(&FirstObject);

Second SecondObject;

fun(&SecondObject);

}

void fun(First *obj)

{

obj?>Print();

}

Options:

A.

It prints: from First

B.

It prints: from Firstfrom First

C.

It prints: from Firstfrom Second

D.

It prints: from Secondfrom Second

Question 3

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

#include

using namespace std;

class BaseC

{

public:

int *ptr;

BaseC() { ptr = new int(10);}

BaseC(int i) { ptr = new int(i); }

~BaseC() { delete ptr; }

};

void fun(BaseC x);

int main()

{

BaseC *o = new BaseC(5);

fun(*o);

}

void fun(BaseC x) {

cout << "Hello:"<<*x.ptr;

}

Options:

A.

It prints: Hello:50

B.

It prints: Hello:10

C.

It prints: Hello:5

D.

Compilation error