C++-Institute CPA Exam Dumps PDF

C++ Certified Associate Programmer

Total Questions: 220
Update Date: April 16, 2024

PDF + Test Engine $65
Test Engine $55
PDF $45

  • Last Update on April 16, 2024
  • 100% Passing Guarantee of CPA Exam
  • 90 Days Free Updates of CPA Exam
  • Full Money Back Guarantee on CPA Exam

DumpsFactory is forever best for your C++-Institute CPA exam preparation.

For your best practice we are providing you free questions with valid answers for the exam of C++-Institute, to practice for this material you just need sign up to our website for a free account. A large bundle of customers all over the world is getting advantages by our C++-Institute CPA dumps. We are providing 100% passing guarantee for your CPA that you will get more high grades by using our material which is prepared by our most distinguish and most experts team.

Most regarded plan to pass your C++-Institute CPA exam:

We have hired most extraordinary and most familiar experts in this field, who are so talented in preparing the material, that there prepared material can succeed you in getting the high grades in C++-Institute CPA exams in one day. That is why DumpsFactory available for your assistance 24/7.

Easily accessible for mobile user:

Mobile users can easily get updates and can download the C++-Institute CPA material in PDF format after purchasing our material and can study it any time in their busy life when they have desire to study.

Get Pronto C++-Institute CPA Questions and Answers

By using our material you can succeed in C++-Institute CPA exam in your first attempt because we update our material regularly for new questions and answers for C++-Institute CPA exam.

Notorious and experts present C++-Institute CPA Dumps PDF

Our most extraordinary experts are too much familiar and experienced with the behaviour of C++-Institute Exams that they prepared such beneficial material for our users.

Guarantee for Your Investment

DumpsFactory wants that their customers increased more rapidly, so we are providing to our customer with the most demanded and updated questions to pass C++-Institute CPA Exam. You can claim for your investment by using our money back policy if you have not been availed with our promised facilities for the C++-Institute exams. For details visit to Refund Contract.

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 

Answer: C

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 

Answer: B

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 

Answer: A

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

Answer: A

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 

Answer: A

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. 

Answer: B

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 

Answer: B

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 

Answer: B

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 

Answer: C

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; 

Answer: C