Free C++ Institute CPP Exam Actual Questions

The questions for CPP were last updated On Mar 25, 2025

At ValidExamDumps, we consistently monitor updates to the C++ Institute CPP exam questions by C++ Institute. Whenever our team identifies changes in the exam questions,exam objectives, exam focus areas or in exam requirements, We immediately update our exam questions for both PDF and online practice exams. This commitment ensures our customers always have access to the most current and accurate questions. By preparing with these actual questions, our customers can successfully pass the C++ Institute CPP - C++ Certified Professional Programmer Exam exam on their first attempt without needing additional materials or study guides.

Other certification materials providers often include outdated or removed questions by C++ Institute in their C++ Institute CPP exam. These outdated questions lead to customers failing their C++ Institute CPP - C++ Certified Professional Programmer Exam exam. In contrast, we ensure our questions bank includes only precise and up-to-date questions, guaranteeing their presence in your actual exam. Our main priority is your success in the C++ Institute CPP exam, not profiting from selling obsolete exam questions in PDF or Online Practice Test.

 

Question No. 1

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"};

multimap m;

for(int i=0; i<10; i++) {

m.insert(pair(second[i],first[i]));

}

if (m[11] == "eleven") {

cout<<"eleven ";

}

for(multimap::iterator i=m.begin();i!= m.end(); i++) {

cout<second<<" ";

}

cout<

return 0;

}

Show Answer Hide Answer
Correct Answer: E

Question No. 2

What happens when you attempt to compile and run the following code?

#include

#include

#include

using namespace std;

int main(){

int t[] ={ 3, 4, 2, 1, 6, 5, 7, 9, 8, 0 };

vectorv(t, t+10);

multiset s1(v.begin(),v.end());

s1.insert(v.begin(),v.end());

pair::iterator,multiset::iterator> range;

range = s1.equal_range(6);

while (range.first != range.second) {

cout<<*range.first<<" "; range.first++;

}

return 0;

}

Show Answer Hide Answer
Correct Answer: A

Question No. 3

What will happen when you attempt to compile and run the following code?

#include

#include

using namespace std;

int main ()

{

float f = 10.126;

cout.unsetf(ios::floatfield);

cout<

return 0;

}

What will be a mantissa part of the numbers displayed:

Show Answer Hide Answer
Correct Answer: D

Question No. 4

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<

int main() {

int t1[]={1,2,3,4,5,6,7,8,9,10};

int t2[]={1,2,3,4,5,6,7,8,9,10};

vector v1(t1, t1+10);

vector v2(t2, t2+10);

vector v3(10);

transform(v1.begin(), v1.end(), v2.rbegin(), v3.begin(), minus());

for_each(v3.rbegin(), v3.rend(), Out(cout));cout<

return 0;

}

Program outputs:

Show Answer Hide Answer
Correct Answer: A

Question No. 5

What happens when you attempt to compile and run the following code?

#include

#include

#include

using namespace std;

bool compare(int a, int b) { return a == b; }

int main () {

int t[] = {1,2,3,4,5,1,2,3,4,5};

vector v (t,t+10);

vector::iterator it = v.begin();

int m1[] = {1, 2, 3};

while ( (it = find_first_of (it, v.end(), m1, m1+3)) != v.end()) {

cout<

}

cout<< endl;

return 0;

}

Show Answer Hide Answer
Correct Answer: E