• support@dumpspool.com
SPECIAL LIMITED TIME DISCOUNT OFFER. USE DISCOUNT CODE TO GET 20% OFF DP2021

PDF Only

$35.00 Free Updates Upto 90 Days

  • CPA Dumps PDF
  • 220 Questions
  • Updated On April 22, 2024

PDF + Test Engine

$60.00 Free Updates Upto 90 Days

  • CPA Question Answers
  • 220 Questions
  • Updated On April 22, 2024

Test Engine

$50.00 Free Updates Upto 90 Days

  • CPA Practice Questions
  • 220 Questions
  • Updated On April 22, 2024
Check Our Free C++ Institute CPA Online Test Engine Demo.

How to pass C++ Institute CPA exam with the help of dumps?

DumpsPool provides you the finest quality resources you’ve been looking for to no avail. So, it's due time you stop stressing and get ready for the exam. Our Online Test Engine provides you with the guidance you need to pass the certification exam. We guarantee top-grade results because we know we’ve covered each topic in a precise and understandable manner. Our expert team prepared the latest C++ Institute CPA Dumps to satisfy your need for training. Plus, they are in two different formats: Dumps PDF and Online Test Engine.

How Do I Know C++ Institute CPA Dumps are Worth it?

Did we mention our latest CPA Dumps PDF is also available as Online Test Engine? And that’s just the point where things start to take root. Of all the amazing features you are offered here at DumpsPool, the money-back guarantee has to be the best one. Now that you know you don’t have to worry about the payments. Let us explore all other reasons you would want to buy from us. Other than affordable Real Exam Dumps, you are offered three-month free updates.

You can easily scroll through our large catalog of certification exams. And, pick any exam to start your training. That’s right, DumpsPool isn’t limited to just C++ Institute Exams. We trust our customers need the support of an authentic and reliable resource. So, we made sure there is never any outdated content in our study resources. Our expert team makes sure everything is up to the mark by keeping an eye on every single update. Our main concern and focus are that you understand the real exam format. So, you can pass the exam in an easier way!

IT Students Are Using our C++ Certified Associate Programmer Dumps Worldwide!

It is a well-established fact that certification exams can’t be conquered without some help from experts. The point of using C++ Certified Associate Programmer Practice Question Answers is exactly that. You are constantly surrounded by IT experts who’ve been through you are about to and know better. The 24/7 customer service of DumpsPool ensures you are in touch with these experts whenever needed. Our 100% success rate and validity around the world, make us the most trusted resource candidates use. The updated Dumps PDF helps you pass the exam on the first attempt. And, with the money-back guarantee, you feel safe buying from us. You can claim your return on not passing the exam.

How to Get CPA Real Exam Dumps?

Getting access to the real exam dumps is as easy as pressing a button, literally! There are various resources available online, but the majority of them sell scams or copied content. So, if you are going to attempt the CPA exam, you need to be sure you are buying the right kind of Dumps. All the Dumps PDF available on DumpsPool are as unique and the latest as they can be. Plus, our Practice Question Answers are tested and approved by professionals. Making it the top authentic resource available on the internet. Our expert has made sure the Online Test Engine is free from outdated & fake content, repeated questions, and false plus indefinite information, etc. We make every penny count, and you leave our platform fully satisfied!

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 

Question # 23

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

A. It prints: Hello World6 
B. It prints: Hello 
C. It prints: World 
D. It prints: Hello World5 

Question # 24

What happens when you attempt to compile and run the following code?#include <iostream> using namespace std; int mul (int a, int b=2) { int r; r=a*b; return (r); }  int main () { cout << mul(1) << mul(2,4); return 0; }

A. It prints: 2 
B. It prints: 28 
C. It prints: 8
D. It prints: 6 

Question # 25

What happens when you attempt to compile and run the following code?#include <iostream> using namespace std; int main() { long int x,y=10; double d; d = 3.99; x=(int) d; cout << x <<", "; d=float (y); cout << d; return 0; }

A. It prints: 3, 10 
B. It prints: 3.99, 10 
C. It prints: 4, 10.0 
D. It prints: 4, 10 

Question # 26

What happens when you attempt to compile and run the following code?#include <iostream> using namespace std; namespace myNamespace1 { int x = 5; int y = 10; } namespace myNamespace2 { float x = 3.14; float y = 1.5; } int main () {namespace newname = myNamespace1; using namespace newname; cout << x << " "; cout << y; return 0; }

A. It prints: 5 1.5 
B. It prints: 3.14 1.5 
C. It prints: 5 10 
D. It prints: 5 

Question # 27

Which of the following is a correct way to define the function fun() in the program below?#include <iostream> #include <sstream> #include <string> using namespace std; int main() { int a[2][2]; fun(a); return 0; }

A. void fun(int *p[2]) {} 
B. void fun(int *p[2][2]) {} 
C. void fun(int *p[][2]) {} 
D. void fun(int p[][2]) {} 

Question # 28

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(0.5) || fun(0); cout << i; return 0; }

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

Question # 29

Which code, inserted at line 10, generate the output "50"?#include <iostream> using namespace std; class Base { int age; public: Base () { age=5; }; //insert code here void Print() { cout << age;} }; void setAge(Base &ob) {ob.age = 0;} int main () {Base a; a.Print(); setAge(a); a.Print(); return 0; }

A. friend void setAge(Base ob); 
B. friend void setAge(Base *ob); 
C. friend void setAge(Base &ob); 
D. None of these 

Question # 30

What happens when you attempt to compile and run the following code?#include <iostream> using namespace std; class A { public: virtual void Print()=0; }; class B:public A { public: virtual void Print(){ cout<< "B";} }; int main() { B ob2; A *obj; obj = &ob2; obj?>Print(); }

A. It prints: B 
B. It prints: A 
C. It prints: AB 
D. It prints: BA 

Question # 31

What happens when you attempt to compile and run the following code?#include <iostream> using namespace std; class Base { static int age; public: Base () {}; ~Base () {}; void setAge(int a=20) {age = a;} void Print() { cout << age;} }; int Base::age=0;int main () { Base a; a.setAge(10); a.Print(); a.setAge(); a.Print(); return 0; }

A. It prints: 10 
B. It prints: 20 
C. It prints: 1020 
D. It prints: 2010

Question # 32

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; int z; A() { x=1; 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: 10 
B. It prints: 2 
C. It prints: 6 
D. It prints: 5 

Question # 33

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

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

Question # 34

What happens when you attempt to compile and run the following code?#include <iostream> using namespace std; int main() { int i = 0; i++; goto lab; i++; lab: cout<<i; return 0; }

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

Question # 35

What is the output of the program given below?#include <iostream> using namespace std; int main (int argc, const char * argv[]) { float f=?10.501; cout<<(int)f; }

A. 0 
B. 11 
C. ?10 
D. ?11 

Question # 36

What happens when you attempt to compile and run the following code?#include <iostream> using namespace std; class A { public : void print() { cout << "A "; } }; class B { public : void print() { cout << "B "; } }; int main() { B sc[2]; B *bc = (B*)sc; for (int i=0; i<2;i++) (bc++)->print(); return 0; }

A. It prints: A A 
B. It prints: B B 
C. It prints: A B 
D. It prints: B A 

Question # 37

What happens when you attempt to compile and run the following code?#include <iostream> using namespace std; class Base { int age; public: class C { int b; void PrintC() { cout << b; } }; Base () {age=5;}; void setAge(int a=20) {age = a;} void Print() { cout << age;} }; int main () { Base a; a.setAge(10); a.Print(); return 0; }

A. It prints: 1020 
B. It prints: 105 
C. It prints: 10 
D. It prints: 20 

Question # 38

If there is one, point out an error in the program#include <iostream> using namespace std; int main() { int c = 'a'; switch(i) { case '2': cout<<"OK"; case '1': cout<<"Error"; default: break; } return 0; }

A. No Error 
B. Use of undeclared identifier 'i' 
C. Illegal use of 'continue' 
D. Illegal use of 'break' 

Question # 39

What will happen when you attempt to compile and run the following code?#include <iostream> #include <string> using namespace std; int fun(int); int main() { int *x = new int; *x=10; cout << fun(*x); return 0; } int fun(int i) { return i*i; }

A. It will print: 100 
B. It will print: 101 
C. It will print: 10 
D. It will print: 1 

Question # 40

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

A. 012345 
B. 0123 
C. 5 
D. 6 

Question # 41

What happens when you attempt to compile and run the following code?#include <iostream> using namespace std; void fun(char*); int main() { char t[4]={'0', '1', '2', '3'}; fun(&t[0]); return 0; } void fun(char *a) { cout << *a; }

A. It prints: 01 
B. It prints: 1 
C. It prints: 0 
D. It prints: 0123 

Question # 42

If there is one, point out an error in the program#include <iostream> using namespace std; int main() { int i=1; for(;;) { cout<<i++; if(i>5) break; } return 0; }

A. Error in “if” statement 
B. Error in “for” loop 
C. No error 
D. Error in break statement 

Question # 43

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

Question # 44

What happens if characters 'w', 'o', 'r', 'l' and 'd' are entered as input?#include <iostream> #include <string> using namespace std; int main() { string s1 = "Hello"; string s2; getline( cin, s2 ); cout << s1 + s2; return( 0 ); }

A. It prints: Helloworld 
B. It prints: Hello 
C. It prints: world 
D. Compilation error