Free C++ Institute CPP-22-02 Exam Questions

Become C++ Institute Certified with updated CPP-22-02 exam questions and correct answers

Page:    1 / 46      
Total 230 Questions | Updated On: Dec 18, 2025
Add To Cart
Question 1

What will be output of the program when you attempt to compile and run the followingcode? #include  #include  #include  #include  using namespace std; int main(){ int second[] ={ 3, 4, 2, 1, 6, 5, 7, 9, 8, 0 }; string first[] = {"three", "four", "two", "one", "six","five", "seven", "nine","eight","zero"}; multimap m;for(int i=0; i<10; i++) { m.insert(pair(second[i],first[i])); } m[0]="ten"; m.insert(pair(1,"eleven")); for(multimap::iterator i=m.begin();i!= m.end(); i++) { cout<second<<" "; } return 0; }


Answer: A
Question 2

What happens when you attempt to compile and run the following code? #include  #include  #include  #include  using namespace std; templatestruct Out { ostream & out; Out(ostream & o): out(o){} void operator() (const T & val ) { out<


Answer: D
Question 3

What happens when you attempt to compile and run the following code? #include #include  #include  using namespace std; int main(){ int second[] ={ 3, 4, 2, 1, 6, 5, 7, 9, 8, 10 }; string first[] = {"three", "four", "two", "one", "six","five", "seven", "nine","eight"," ten"}; map m; for(int i=0; i<10; i++) { m.insert(pair(second[i],first[i])); } if (m[11] == "eleven") { cout<<"eleven "; } for(map::iterator i=m.begin();i!= m.end(); i++) { cout<second<<" "; } cout<


Answer: A
Question 4

What happens when you attempt to compile and run the following code? #include  using namespace std; int main () { float f1 = 10.0; float f2 = 10.123; cout<


Answer: D
Question 5

What happens when you attempt to compile and run the following code? #include  #include  #include  using namespace std; int main(){ int t[] ={ 1, 1, 2, 2, 3, 3, 4, 4, 5, 5 }; listv(t, t+10); multiset s1(v.begin(),v.end()); if (s1.count(3) == 2) { s1.erase(3); } for(multiset::iterator i=s1.begin();i!= s1.end(); i++) { cout<<*i<<" "; } return 0; } 


Answer: D
Page:    1 / 46      
Total 230 Questions | Updated On: Dec 18, 2025
Add To Cart

© Copyrights DumpsCertify 2025. All Rights Reserved

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