CPA Exam Questions & Answers

Exam Code: CPA

Exam Name: C++ Certified Associate Programmer

Updated: Apr 19, 2024

Q&As: 220

At Passcerty.com, we pride ourselves on the comprehensive nature of our CPA 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 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 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 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 fun(int x) {

return x<<2;

}

int main(){

int i;

i = fun(1) / 2;

cout << i;

return 0;

}

A. It prints: 0

B. It prints: 1

C. It prints: 2

D. It prints: 4

Show Answer
Questions 2

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 << z;

}

};

int main () {

B b;

A. set();

B. Print(); return 0; }

C. It prints: 4John

D. It prints: 2John

E. It prints: 23

F. It prints: 43

Show Answer
Questions 3

Which of the following statements are correct?

A. A function can be defined inside another function

B. A function may have any number of return statements each returning different values.

C. A function can return floating point value

D. In a function two return statements should never occur.

Show Answer
Questions 4

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

#include

using namespace std;

int compare(int, int);

int main()

{

int x = compare(10, 20);

cout << x;

return 0;

}

int compare(int i, int j)

{

return i

}

A. It prints: 0

B. It prints: 2

C. It prints: 1

D. It prints: 10

Show Answer
Questions 5

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

#include

using namespace std;

#define A 1

int main()

{

#if A

cout<<"Hello";

#endif

cout<<"world";

return 0;

}

A. It will print: Helloworld

B. It will print: Hello

C. It will print: world

D. It will print: 0

Show Answer

Viewing Page 2 of 3 pages. Download PDF or Software version with 220 questions