CPA-21-02 Exam Questions & Answers

Exam Code: CPA-21-02

Exam Name: CPA - C++ Certified Associate Programmer

Updated: Nov 25, 2024

Q&As: 257

At Passcerty.com, we pride ourselves on the comprehensive nature of our CPA-21-02 exam dumps, designed meticulously to encompass all key topics and nuances you might encounter during the real examination. Regular updates are a cornerstone of our service, ensuring that our dedicated users always have their hands on the most recent and relevant Q&A dumps. Behind every meticulously curated question and answer lies the hard work of our seasoned team of experts, who bring years of experience and knowledge into crafting these premium materials. And while we are invested in offering top-notch content, we also believe in empowering our community. As a token of our commitment to your success, we're delighted to offer a substantial portion of our resources for free practice. We invite you to make the most of the following content, and wish you every success in your endeavors.


Download Free C++ Institute CPA-21-02 Demo

Experience Passcerty.com exam material in PDF version.
Simply submit your e-mail address below to get started with our PDF real exam demo of your C++ Institute CPA-21-02 exam.

Instant download
Latest update demo according to real exam

*Email Address

* Our demo shows only a few questions from your selected exam for evaluating purposes

Free C++ Institute CPA-21-02 Dumps

Practice These Free Questions and Answers to Pass the C++ Certified Professional Programmer Exam

Questions 1

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

#include

using namespace std;

int main()

{

int x=20;

int *ptr;

ptr = andx;

cout<<*ptr;

return 0;

}

A. It prints: 20

B. It prints: 0

C. It prints address of ptr

D. It prints: 2

Show Answer
Questions 2

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

A. It prints: 1

B. lt prints: 2

C. It prints: 111

D. It prints: 121

Show Answer
Questions 3

If a function, which is not a method, needs to save any value between its subsequent invocations, this can be done by: (Choose two.)

A. setting a variable declared inside the function with the static modifier

B. setting a parameter of the function

C. setting a variable declared outside the function

D. setting a variable declared inside the function without the static modifier

Show Answer
Questions 4

What will be the output of the program?

#include

using namespace std;

int main()

{

int i=0;

for(; i<=5; i++)

cout << i;

return 0;

}

A. 012345

B. 0123

C. 5

D. 6

Show Answer
Questions 5

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

#include

#include

using namespace std;

class complex{

double re, im;

public:

complex() : re(1),im(0.3) {}

complex(double n) { re=n,im=n;};

complex(int m,int n) { re=m,im=n;}

complex operator+(complex andt);

void Print() { cout << re << " " << im; }

};

complex complex::operator+ (complex andt){

complex temp;

temp.re = this?>re + t.re;

temp.im = this?>im + t.im;

return temp;

}

int main(){

complex c1(1),c2(2),c3;

c3 = c1 + c2;

c3.Print();

}

A. It prints: 1 1.5

B. It prints: 2 1.5

C. It prints: 3 3

D. It prints: 0 0

Show Answer

Viewing Page 1 of 3 pages. Download PDF or Software version with 257 questions