FreeQAs
 Request Exam  Contact
  • Home
  • View All Exams
  • New QA's
  • Upload
PRACTICE EXAMS:
  • Oracle
  • Fortinet
  • IBM
  • Juniper
  • Microsoft
  • Cisco
  • Citrix
  • CompTIA
  • VMware
  • ISC
  • SAP
  • EMC
  • PMI
  • HP
  • Salesforce
  • Other
  • Oracle
    Oracle
  • Fortinet
    Fortinet
  • IBM
    IBM
  • Juniper
    Juniper
  • Microsoft
    Microsoft
  • Cisco
    Cisco
  • Citrix
    Citrix
  • CompTIA
    CompTIA
  • VMware
    VMware
  • ISC
    ISC
  • SAP
    SAP
  • EMC
    EMC
  • PMI
    PMI
  • HP
    HP
  • Salesforce
    Salesforce
  1. Home
  2. C++ Institute Certification
  3. CPA Exam
  4. c-plus-plus-institute.CPA.premium Dumps

Free C++ Institute CPA Exam Dumps Questions & Answers

Exam Code/Number:CPAJoin the discussion
Exam Name:C++ Certified Associate Programmer
Certification:C++ Institute
Question Number:220
Publish Date:May 25, 2026
Rating
100%
Page: 1 / 44
Total 220 questions
Captcha image

Question 1

What happens when you attempt to compile and run the following code?
#include <iostream>
#include <string>
using namespace std;
class A {
public:
string s;
A(string s) { this->s = s; }
};
class B {
public:
string s;
B (A a) { this->s = a.s; }
void print() { cout<<s; }
};
int main()
{
A a("Hello world");
B b=a;
b.print();
}

Correct Answer: C

Question 2

What happens when you attempt to compile and run the following code?
#include <iostream>
using namespace std;
class First
{
public:
First() { cout << "Constructor";}
void Print(){ cout<<"from First";}
};
int main()
{
First FirstObject;
FirstObject.Print();
}

Correct Answer: B

Question 3

What happens when you attempt to compile and run the following code?
#include <iostream>
using namespace std;
int op(int x, int y);
int main()
{
int i=2, j=2, k;
float f=0.3;
k = op(i, j);
cout<< k << "," << op(1, f);
return 0;
}
int op(int x, int y)
{
return x+y;
}

Correct Answer: B

Question 4

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

Correct Answer: C

Question 5

What is the output of the program if characters 't', 'e', 's' and 't' enter are supplied as input?
#include <iostream> #include <string>
using namespace std;
int main()
{
string s;
getline( cin, s );
cout << s << " " << s.length();
return( 0 );
}

Correct Answer: C

Add Comments

Your email address will not be published. Required fields are marked *

insert code
Type the characters from the picture.
Rating:
[×]

Download PDF File

Enter your email address to download c-plus-plus-institute.CPA.premium Dumps

Email:

FreeQAs

Our website provides the Largest and the most Latest vendors Certification Exam materials around the world.

Using dumps we provide to Pass the Exam, we has the Valid Dumps with passing guranteed just which you need.

  • DMCA
  • About
  • Contact Us
  • Privacy Policy
  • Terms & Conditions
©2026 FreeQAs

www.freeqas.com materials do not contain actual questions and answers from Cisco's certification exams.