$0.00
C++-Institute CPA Dumps

C++-Institute CPA Exam Dumps

C++ Certified Associate Programmer

Total Questions : 220
Update Date : September 02, 2024
PDF + Test Engine
$65 $95
Test Engine
$55 $85
PDF Only
$45 $75



Last Week CPA Exam Results

161

Customers Passed C++-Institute CPA Exam

98%

Average Score In Real CPA Exam

99%

Questions came from our CPA dumps.



Choosing the Right Path for Your CPA Exam Preparation

Welcome to PassExamHub's comprehensive study guide for the C++ Certified Associate Programmer exam. Our CPA dumps is designed to equip you with the knowledge and resources you need to confidently prepare for and succeed in the CPA certification exam.

What Our C++-Institute CPA Study Material Offers

PassExamHub's CPA dumps PDF is carefully crafted to provide you with a comprehensive and effective learning experience. Our study material includes:

In-depth Content: Our study guide covers all the key concepts, topics, and skills you need to master for the CPA exam. Each topic is explained in a clear and concise manner, making it easy to understand even the most complex concepts.
Online Test Engine: Test your knowledge and build your confidence with a wide range of practice questions that simulate the actual exam format. Our test engine cover every exam objective and provide detailed explanations for both correct and incorrect answers.
Exam Strategies: Get valuable insights into exam-taking strategies, time management, and how to approach different types of questions.
Real-world Scenarios: Gain practical insights into applying your knowledge in real-world scenarios, ensuring you're well-prepared to tackle challenges in your professional career.

Why Choose PassExamHub?

Expertise: Our CPA exam questions answers are developed by experienced C++-Institute certified professionals who have a deep understanding of the exam objectives and industry best practices.
Comprehensive Coverage: We leave no stone unturned in covering every topic and skill that could appear on the CPA exam, ensuring you're fully prepared.
Engaging Learning: Our content is presented in a user-friendly and engaging format, making your study sessions enjoyable and effective.
Proven Success: Countless students have used our study materials to achieve their CPA certifications and advance their careers.
Start Your Journey Today!

Embark on your journey to C++ Certified Associate Programmer success with PassExamHub. Our study material is your trusted companion in preparing for the CPA exam and unlocking exciting career opportunities.


Related Exams


C++-Institute CPA Sample Question Answers

Question # 1

What happens when you attempt to compile and run the following code?#include <iostream> using namespace std; int main() { int i=5; switch(i) { case 1: cout<<"Hello"; break; case 2: cout<<"world"; break; case 3: break; default: cout<<"End"; }  return 0; }

A. It prints: Hello 
B. It prints: world 
C. It prints: End 
D. It prints: Helloworld 



Question # 2

What happens when you attempt to compile and run the following code?#include <iostream> using namespace std; int fun(int x) { return 2*x; } int main(){ int i; i = fun(1) || fun(2); cout << i; return 0; }

A. It prints: 0 
B. It prints: 1 
C. It prints: -1 
D. Compilation error 



Question # 3

What happens when you attempt to compile and run the following code?#include <iostream> #include <string> using namespace std; int main() { string s1[]= {"H" , "t" }; string s; for (int i=0; i<2; i++) { s = s1[i]; s.insert(1,"o"); cout << s; } return( 0 ); }

A. It prints: Hoto 
B. It prints: Ho 
C. It prints: to 
D. It prints: Ht 



Question # 4

What is the output of the program?#include <iostream> #include <string>  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 = &ob1; 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: Johnlan



Question # 5

What happens when you attempt to compile and run the following code?#include <iostream> #include <string> using namespace std; class A { protected: int y; public: int x, z; A() : x(1), y(2), z(0) {} A(int a, int b) : x(a), y(b) { z = x * y;} void Print() { cout << z; } }; class B : public A { public: int y; B() : A() {} B(int a, int b) : A(a,b) {} void Print() { cout << z; } }; int main () { A b(2,5); b.Print(); return 0; }

A. It prints: 10 
B. It prints: 2 
C. It prints: 5 
D. It prints: 1 



Question # 6

What happens when you attempt to compile and run the following code?#include <iostream> #include <string> using namespace std; class SampleClass { string *s; public: SampleClass() { s = new string("Text");} SampleClass(string s) { this?>s = new string(s);} ~SampleClass() { delete s;} void Print(){ cout<<*s;} }; int main() { SampleClass *obj; obj = new SampleClass("Test"); obj?>Print(); }

A. It prints: Text 
B. It prints: Test 
C. It prints: TextTest 
D. Garbage value. 



Question # 7

What happens when you attempt to compile and run the following code?#include <iostream> using namespace std; int main (int argc, const char * argv[]) { int tab[5]={1,2,3}; for (int i=0; i<5; i++) cout <<tab[i]; return 0; }

A. compilation fails 
B. It prints: 12300 
C. It prints: 12345 
D. It prints: 00000 



Question # 8

What happens when you attempt to compile and run the following code?#include <iostream> using namespace std; class First { public: 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(); }

A. It prints: from First 
B. It prints: from Firstfrom First 
C. It prints: from Firstfrom Second 
D. It prints: from Secondfrom Second 



Question # 9

What will be the output of the program?#include <iostream> #include <string> using namespace std;  int fun(int); int main() { float k=3; k = fun(k); cout<<k; return 0; } int fun(int i) { i++; return i; }

A. 3 
B. 5 
C. 4 
D. 5 



Question # 10

Which code, inserted at line 19, generates the output "23"?#include <iostream> #include <string> 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: int y; void set() { y = 4; z = "John"; } void Print() { //insert code here } }; int main () { B b; b.set(); b.Print(); return 0; }

A. cout << y << z
B. cout << y << A::z; 
C. cout << A::y << A::z; 
D. cout << B::y << B::z; 



Question # 11

What happens when you attempt to compile and run the following code?#include <iostream> using namespace std; int main() { int i = 0; do { i++; if (i==3) break; cout<<i; } while(i < 5); return 0; }

A. It prints: 12 
B. It prints: 1 
C. It prints: 0 
D. No output 



Question # 12

What happens when you attempt to compile and run the following code?#include <iostream> using namespace std; int main() { int i, j; for(i = 0; i < 2; i++) { for(j = i; j < i + 1; j++) if(j == i) continue; else break; } cout << j; return 0; }

A. It prints: 0 
B. It prints: 3 
C. It prints: 2 
D. It prints: 1 



Question # 13

What happens when you attempt to compile and run the following code?#include <iostream> #include <string> using namespace std; class A { int x; protected: int y; public: int z; A() { x=1; y=2; z=3; } }; class B : public A { public: void set() { y = 4; z = 2;} void Print() { cout << y << z; } }; int main () { B b; b.set(); b.Print(); return 0; }

A. It prints: 42 
B. It prints: 44 
C. It prints: 22 
D. It prints: 2 



Question # 14

Which code, inserted at line 18, generates the output "AB"#include <iostream> using namespace std; class A { public: void Print(){ cout<< "A";} void Print2(){ cout<< "a";} }; class B:public A { public: void Print(){ cout<< "B";} void Print2(){ cout<< "b";} }; int main() { B ob2; //insert code here ob2.Print(); }

A. ob2?>A::Print(); 
B. ob2.B::Print(); 
C. ob2?>B::Print(); 
D. ob2.A::Print(); 



Question # 15

What is the output of the program given below?#include <iostream> using namespace std; int main (int argc, const char * argv[]) { enum state { ok, error, warning}; enum state s1, s2, s3, s4; s1 = ok; s2 = warning; s3 = error; s4 = ok;cout << s1<< s2<< s3<< s4; return 0; }

A. 1234 
B. compilation fails 
C. 0210 
D. 1322 



Question # 16

What happens when you attempt to compile and run the following code?#include <iostream> #include <string> using namespace std; class A { public: int age; A () { age=5; }; }; class B : private A { string name; public: B () { name="Bob"; }; void Print() {cout << name << age; } }; int main () { B b,*ob; ob = &b; ob?>age = 10; ob?>Print(); return 0; }

A. It prints: Bob55 
B. It prints: Bob1 
C. It prints: 10 
D. Compilation error 



Question # 17

What is the output of the program?#include <iostream> #include <string> using namespace std; int main() { char str[] = "Hello\0\World\0"; cout << str; return 0; }

A. It prints: Hello 
B. It prints: World 
C. It prints: HW 
D. It prints: World\0World 



Question # 18

What is the output of the program if character “1” is supplied as input?#include <iostream> using namespace std; int main () { int c; cin >> c; try { switch (c) { case 1: throw 20; case 2: throw 5.2f; case 3: throw 'a'; } } catch (int e) { cout << "int exception. Exception Nr. " << e; } catch (float e) { cout << "float exception. Exception Nr. " << e; } catch (...) { cout << "An exception occurred."; } return 0; }

A. It prints: float exception. Exception Nr. 5.2 
B. It prints: int exception. Exception Nr. 20 
C. It prints: An exception occurred 
D. Compilation Error 



Question # 19

What happens when you attempt to compile and run the following code?#include <iostream> #include <string> using namespace std; const int size = 3; class A { public: string name; A() { name = "Bob";} A(string s) { name = s;} A(A &a) { name = a.name;} }; class B : public A { public: int *tab; B() { tab = new int[size]; for (int i=0; i<size; i++) tab[i]=1;} B(string s) : A(s) { tab = new int[size]; for (int i=0; i<size; i++) tab[i]=1;} ~B() { delete tab; } void Print() { for (int i=0; i<size; i++) cout << tab[i]; cout << name; } }; int main () { B b1("Alan"); B b2; b1.tab[0]=0; b1.Print(); b2.Print(); return 0; }

A. It prints: Alan 
B. It prints: 111 
C. It prints: 011Alan111Bob 
D. It prints: 0 



Question # 20

What happens when you attempt to compile and run the following code?#include <iostream> #include <string> 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; }

A. It prints: 123 
B. It prints: 1 
C. It prints: ?123 
D. Compilation error 



Question # 21

What happens when you attempt to compile and run the following code?#include <iostream>  using namespace std; class First { public: void Print(){ cout<<"from First";} }; class Second { public: void Print(){ cout<< "from Second";} }; int main() { Second t[2];for (int i=0; i<2; i++) t[i].Print(); }

A. It prints: from First 
B. It prints: from Firstfrom First 
C. It prints: from Secondfrom Second 
D. It prints: from Second 



Question # 22

What will variable "y" be in class B?class A { int x; protected: int y; public: int age; }; class B : public A { string name; public: void Print() { cout << name << age; } }; 

A. public 
B. private 
C. protected 
D. None of these