Exam Code: CPA
Exam Name: C++ Certified Associate Programmer
Updated: Apr 09, 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.
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
What will the variable "age" be in class B?
class A {
int x;
protected:
int y;
public:
int age;
};
class B : private A {
string name;
public:
void Print() {
cout << name << age;
}
};
A. public
B. private
C. protected
D. None of these
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
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.
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
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
Viewing Page 1 of 3 pages. Download PDF or Software version with 220 questions