×

Special Offer! November Sale at DumpsCity! Get 20% Off on All Certification Exam Questions. Use Code: DC20OFF

Free C++ Institute CPA-21-02 Exam Questions

Try our Free Demo Practice Tests for Comprehensive CPA-21-02 Exam Preparation

  • C++ Institute CPA-21-02 Exam Questions
  • Provided By: C++ Institute
  • Exam: CPA C++ Certified Associate Programmer
  • Certification: C++ Certified Professional Programmer
  • Total Questions: 257
  • Updated On: Nov 21, 2024
  • Rated: 4.9 |
  • Online Users: 514
Page No. 1 of 52
Add To Cart
  • Question 1
    • Which code, inserted at line 8, generates the output "100"? #include using namespace std; int fun(int); int main() { int *x = new int; *x=10; //insert code here return 0; } int fun(int i) { return i*i; } 


      Answer: A,B
  • Question 2
    • What happens when you attempt to compile and run the following code? #include 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; }


      Answer: C
  • Question 3
    • What happens when you attempt to compile and run the following code? #include #include 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; }


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


      Answer: A
  • Question 5
    • Which code, inserted at line 8, generates the output "100"? #include using namespace std; int fun(int); int main() { int *x = new int; *x=10; //insert code here return 0; } int fun(int i) { return i*i; } 


      Answer: A,B
PAGE: 1 - 52
Add To Cart

© Copyrights Dumpscity 2024. All Rights Reserved

We use cookies to ensure your best experience. So we hope you are happy to receive all cookies on the Dumpscity.