Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

C++ Institute CPP - C++ Certified Professional Programmer Exam

Certification Provider: C++ Institute
Exam Name: CPP - C++ Certified Professional Programmer
Duration: 65 Minutes
Number of questions in our database: 228
Exam Version: Apr. 05, 2024
Exam Official Topics:
  • Topic 1: Typical problems when using templates/ Types of sequential containers
  • Topic 2: Classes which provide the input and output capability/ STL Sequential containers
  • Topic 3: Sequential container adapters ?stack, queue and priority queue/ Modifying STL algorithms
  • Topic 4: Dealing with objects as container elements/ STL utilities and functional library
  • Topic 5: List of merging algorithms: merge, includes, min_element, max_element, inplace_merge/ Types of associative containers
  • Topic 6: Putting objects into set and map/ Definition of a modifying algorithm
  • Topic 7: Definition of a non-modifying algorithm/ List of useful functors
  • Topic 8: STL Associative containers/ List of sorting algorithms: random_shuffle, sort, stable_partition, lower_bound, upper_bound
  • Topic 9: Containers compatibility/ Set and multiset ?behavior and API/ map and multimap ?behavior and API
Disscuss C++ Institute CPP - C++ Certified Professional Programmer Topics, Questions or Ask Anything Related

Currently there are no comments in this discussion, be the first to comment!

Free C++ Institute CPP - C++ Certified Professional Programmer Exam Actual Questions

The questions for CPP - C++ Certified Professional Programmer were last updated On Apr. 05, 2024

Question #1

What will happen when you attempt to compile and run the code below, assuming that you enter the following sequence: true true?

#include

#include

using namespace std;

int main ()

{

bool a,b;

cin>>a>>b;

cout<

return 0;

}

Program will output:

Reveal Solution Hide Solution
Correct Answer: E

Question #2

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

#include

#include

using namespace std;

template

class A {

T_v;

public:

A() {}

A(T v): _v(v){}

T getV() { return _v; }

void add(T & a);

void add(string & a);

};

template

void A::add(T & a) { _v+=a; }

void A::add(string & a) {

_v.insert(0, a);

}

int main()

{

Aa("Hello");

string s(" world!");

a.add(s);

cout << a.getV() <

return 0;

}

Reveal Solution Hide Solution
Correct Answer: B

Question #3

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

#include

#include

#include

using namespace std;

void print(int v) { cout<

struct Sequence {

int start;

Sequence(int start):start(start){}

int operator()() {

return 10*(1+(start++ %3));

}

};

int main() {

vector v1(10);

generate_n(v1.begin(), 10, Sequence(1));

remove(v1.begin(), v1.end(), 10);

for_each(v1.begin(), v1.end(), print);cout<

return 0;

}

Program outputs:

Reveal Solution Hide Solution
Correct Answer: C

Question #4

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

multimap m;

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

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

}

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

m.erase(3);

}

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

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

}

return 0;

}

Reveal Solution Hide Solution
Correct Answer: D

Question #5

What will happen when you attempt to compile and run the code below, assuming that you enter the following sequence: true true?

#include

#include

using namespace std;

int main ()

{

bool a,b;

cin>>a>>b;

cout<

return 0;

}

Program will output:

Reveal Solution Hide Solution
Correct Answer: E


Unlock all CPP - C++ Certified Professional Programmer Exam Questions with Advanced Practice Test Features:
  • Select Question Types you want
  • Set your Desired Pass Percentage
  • Allocate Time (Hours : Minutes)
  • Create Multiple Practice tests with Limited Questions
  • Customer Support
Get Full Access Now

Save Cancel