Printable PDF
Vendor: C++ Institute
Exam Code: CPA-21-02
Exam Name: CPA - C++ Certified Associate Programmer
Certification: C++ Certified Professional Programmer
Total Questions: 257 Q&A
Updated on: Nov 16, 2024
Note: Product instant download. Please sign in and click My account to download your product.
What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
class A {
protected:
int y;
public:
int x;
int z;
A() { x=2; y=2; z=3; }
A(int a, int b) : x(a), y(b) { z = x ? y;}
void Print() {
cout << z;
}
};
int main () {
A a(2,5);
a.Print();
return 0;
}
A. It prints: ?3
B. It prints: 2
C. It prints: 6
D. It prints: 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<
}
};
int main()
{
First t[2];
for (int i=0; i<2; i++)
t[i].Print();
}
A. It prints: 30
B. It prints: John
C. It prints: John 31
D. It prints: John 30John 30
What is the output of the program?
#include
#include
using namespace std;
class First
{
string name;
public:
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 = andob1;
t?>setName();
t?>Print();
t = ob2;
t?>setName("Steve");
ob2?>Print();
}
A. It prints: JohnSteve
B. It prints: AlanAlan
C. It prints: AlanSteve
D. It prints: JohnAlan
zew
Wonderful. I just passed,good luck to you.
Nathen
Passed today......... Thanks a lot guys! I only Study your manuals and sims. Valid dumps! Good luck to u all~!
zmaster2
I knew this dumps by accident. One month ago, I searched on the Internet and found this material. At first, I didn't dare to pay much attention on this material and also brought many other material. But when i used all the materials I brought , I found that there are many new questions and the answers are or accurate in this material.Gradually,I payed more attention on this material and at last I only used this material. Today I have cleared that I passed the exam with high score. So I recommend this material strongly.
JohnS
Valid. Pass with 9XX. Good Luck!!!
Ravi
Valid study material! Go get it now!!!
Quinley
This Dump is Valid.I gave my test today, and passed,thanks!
Rainer
valid just passed my exam with this dumps. SOme answers are incorrect. but so far so good. thanks
Olsen
One of my friends told me that your dumps are good and I purchased it. Great. I passed my exam with it. Nice work, guys.
Baines
dumps is valid.
10.110.0.5
Valid dumps. Answers are accurate. I come get few new questions in the exam. Maybe 2-3 VERY SIMPLE. Good Luck All!!!!
The following table comprehensively analyzes the quality and value of C++ Certified Professional Programmer CPA-21-02 exam materials.