BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Free C++ Institute CPP Exam Dumps

Here you can find all the free questions related with C++ Institute CPP - C++ Certified Professional Programmer Exam (CPP) exam. You can also find on this page links to recently updated premium files with which you can practice for actual C++ Institute CPP - C++ Certified Professional Programmer Exam . These premium versions are provided as CPP exam practice tests, both as desktop software and browser based application, you can use whatever suits your style. Feel free to try the CPP - C++ Certified Professional Programmer Exam premium files for free, Good luck with your C++ Institute CPP - C++ Certified Professional Programmer Exam .
Question No: 1

MultipleChoice

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

#include <iostream>

#include <map>

using namespace std;

int main() {

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

string s[] = { 'one', 'one', 'two', 'two', 'three','three', 'four', 'four', 'five', 'five'};

map<int, string> m;

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

m.insert(pair<int, string>(t[i], s[i]));

}

if (m.count(3) == 2) {

m.erase(3);

}

for (map<int, string>::iterator i = m.begin(); i != m.end(); i++) {

cout << i?>first << ' ';

}

return 0;

}

Options
Question No: 2

MultipleChoice

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

#include

#include

using namespace std;

int main() {

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

string s[] = { "one", "one", "two", "two", "three","three", "four", "four", "five", "five"};

map m;

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

m.push_back(pair(t[i], s[i]));

}

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

cout << i?>first << " ";

}

return 0;

}

Options
Question No: 3

MultipleChoice

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<

return 0;

}

Options

Save Cancel