Important C++ Institute CPA-21-02 Exam Questions

CertPrep C++ Institute CPA-21-02 Exam Questions
Get Full Version

C++ Institute CPA - C++ Certified Associate Programmer Exam CPA-21-02 Exam

Attempt the C++ Certified Associate Programmer practice test and solve real exam-like CPA-21-02 questions to prepare efficiently and increase your chances of success. Our C++ Institute CPA-21-02 practice questions match the actual CPA - C++ Certified Associate Programmer Exam format, helping you enhance confidence and improve performance. With our CPA-21-02 practice exam software, you can analyze your performance, identify weak areas, and work on them effectively to boost your final C++ Certified Associate Programmer exam score.

Vendor: C++ Institute
Exam Name: CPA - C++ Certified Associate Programmer Exam
Registration Code: CPA-21-02
Related Certification: C++ Institute CPA Programmer Certification
Exam Track: C++ Institute Development
Exam Audience:

Total Questions

257

Last Updated

13-08-2026

Exam Duration

65 MINUTES

Upgrade to Premium

GET FULL PDF

Question: 1

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

#include

using namespace std;

int main()

{

int i = 5;

do {

i??;

cout<

}

while(i >= 0);

return 0;

}

Question: 2

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

#include

using namespace std;

class First

{

public:

virtual 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();

}

Question: 3

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

#include

using namespace std;

int op(int x, int y);

int main()

{

float *pf;

float f=0.9;

pf=&f;

cout << op(1, *pf);

return 0;

}

int op(int x, int y)

{

return x*y;

}

Question: 4

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;

};

class B : private A {

string name;

public:

void set() {

x = 1;

}

void Print() {

cout << x;

}

};

int main () {

B b;

b.set();

b.Print();

return 0;

}

Question: 5

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

#include

#include

using namespace std;

struct Person {

string name;

int age;

};

class First

{

Person *person;

public:

First() {person = new Person;

person?>name = "John";

person?>age = 30;

}

void Print(){

cout<name << " "<< person?>age;

}

};

int main()

{

First t[2];

for (int i=0; i<2; i++)

t[i].Print();

}

Other C++ Institute Certification Exams

CPP Exam

CPP - C++ Certified Professional Programmer Exam