CPP C++ Institute
Rate this post

C++ Institute CPP Exam Info and Free Practice Test | ExamsTorrent

Pass C++ Institute CPP Premium Files Test Engine pdf – Free Dumps Collection

Study Courses for the CPP Exam

One of the study courses that a candidate can use to prepare for the C++ CPP exam is the self-enroll CPP course from the C++ Institute. It is a free, online-based resource that assists students to gain knowledge about advanced concepts and content areas such as templates alongside the STL (Standard Template Library). The main objective is help candidates understand template mechanisms in C++. The training also covers the use of property template methods and categories, using third-party templates, combined with the creation of template functions and classes. It also touches the candidate’s understanding of the C++ STL, inclusive of the IO components, and teaches how to handle programming issues using the STL predefined categories as well as methods. As a result, you will have 10 weeks to complete all 9 modules of the training program and test your skills with a practical exam that includes 40-50 questions. After that, you will get access to the final test, which is a representation of the actual CPP exam. It has 50 questions and a candidate’s performance here helps in checking how ready one is for the final exam.

A learner can also opt for the paid instructor-led course, the CPP: Advanced Programming in C++. During this training, there will be the utilization of resources and materials that the C++ Institute has approved. So, this course is ideal for the CPP test-takers as it allows them to work with different templates as well as the STL. It is presented in form of 9 educative modules, alongside practical labs, and final evaluation tests. And the course also orients a candidate into a learning community where they can interact with tutors and other learners, ask questions here, and debate on the various concepts covered in the course.

However, you should consider the prerequisites for participation in this program. Among these is a good knowledge and skills in the C++ programming language including operator overloading and inheritance. In addition, each candidate must have already taken a C++ language training course at the associate level and obtain the related CPA – C++ Certified Associate Programmer certification.

 

Q52. What will happen when you attempt to compile and run the following code?
#include <deque>
#include <vector>
#include <iostream>
using namespace std;
int main ()
{
vector<int>v1;
deque<int>d1;
for(int i=0; i<5; i++)
{
v1.push_back(i);v1.push_front(i);
d1.push_back(i);d1.push_front(i);
}
for(int i=0; i<d1.size(); i++)
{
cout<<d1[i]<<” “<<v1[i]<<” “;
}
cout<<endl;
return 0;
}
What will be its output:

 
 
 
 

Q53. Which keywords can be used to define template type parameters? Choose all possible answers:

 
 
 
 
 

Q54. What happens when you attempt to compile and run the following code?
#include <vector>
#include <iostream>
int main ()
{
std::vector<int>v1;
for(int i = 0; i<10; i++) {v1.push_back(i); }
v1.resize(4);
std::vector<int>::iterator it = v1.end();
v1.insert(v1.end()?1, 4);
for(int i=0 ; i<= v1.size(); i++) {std::cout<<v1.at(i)+v1[i]<<” “; }std::cout<<std::endl; return 0;
}

 
 
 
 
 

Q55. What happens when you attempt to compile and run the following code?
#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;
template<class T>struct Out {
ostream & out;
Out(ostream & o): out(o){}
void operator() (const T & val ) { out<<val<<” “; } };
int main() {
int t1[]={3,2,4,1,5};
int t2[]={6,10,8,7,9};
vector<int> v1(5);
transform(t1,t1+5,t2,v1.rbegin(), plus<int>());
for_each(v1.rbegin(), v1.rend(), Out<int>(cout));cout<<endl;
return 0;
}
Program outputs:

 
 
 
 
 

Q56. What will happen when you attempt to compile and run the following code?
#include <iostream>
#include <set>
#include <vector>
using namespace std;
int main(){
int t[] ={ 3, 4, 2, 1, 6, 5, 7, 9, 8, 0 };
vector<int>v(t, t+10);
set<int> s1(v.begin(),v.end());
s1.insert(v.begin(),v.end());
pair<set<int>::iterator,set<int>::iterator> range;
range = s1.equal_range(6);
cout<<*range.first<<” “<<*range.second<<endl;
return 0;
}
The output will be:

 
 
 
 
 

Q57. What happens when you attempt to compile and run the following code?
#include <deque>
#include <vector>
#include <iostream>
using namespace std;
int main ()
{
int t[] = {1, 2 ,3 ,4 ,5, 6 , 7, 8 , 9, 10};
vector<int>v1(t, t+10);
deque<int>d1(t, t+10);
d1.empty();
v1.empty();
if (v1.isempty())
{
cout<<“I am empty “;
}
else
{
cout<<“I am not empty “;
}
cout<<v1.size()<<” “<<d1.size()<<endl;
return 0;
}

 
 
 
 

Q58. What happens when you attempt to compile and run the following code?
# include <list>
# include <vector>
# include <iostream>
using namespace std;
int main ()
{
int t[] = {1, 2 ,3 ,4 ,5};
vector<int>v1(t, t+5);
list<int>l1;
l1.assign(v1.end(), v1.begin());
for(int i=0; i<l1.size(); i++)
{
cout<<l1.at(i)<<” “;
}
cout<<endl;
return 0;
}

 
 
 
 

Q59. What happens when you attempt to compile and run the following code?
#include <set>
#include <iostream>
#include <algorithm>
using namespace std;
class B { int val;
public:
B(int v):val(v){}
int getV() const {return val;} bool operator < (const B & v) const { return val<v.val;} }; ostream & operator <<(ostream & out, const B & v) { out<<v.getV(); return out;} template<class T>struct Out { ostream & out; Out(ostream & o): out(o){} void operator() (const T & val ) { out<<val<<” “; } }; int main() { int t[]={8, 10, 5, 1, 4, 6, 2, 7, 9, 3}; set<B> s1(t, t+10); sort(s1.begin(), s1.end()); for_each(s1.begin(), s1.end(), Out<B>(cout));cout<<endl; return 0;
}
Program outputs:

 
 
 
 

Q60. What happens when you attempt to compile and run the following code?
# include <iostream>
# include <string>
using namespace std;
template <class T>
class A {
T_v;
public:
A() {}
A(T v): _v(v){}
T getV() { return _v; }
void add(T & a);
void add(string & a);
};
template<class T>
void A<T>::add(T & a) { _v+=a; }
void A<string>::add(string & a) {
_v.insert(0, a);
}
int main()
{
A<string>a(“Hello”);
string s(” world!”);
a.add(s);
cout << a.getV() <<endl;
return 0;
}

 
 
 
 

Q61. What happens when you attempt to compile and run the following code?
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
using namespace std;
int main() {
int t[] = {1,2,3,2,3,5,1,2,7,3,2,1,10, 4,4,5};
vector<int> v1(t, t + 15);
set<int> s1(t, t + 15);
pair<set<int>::iterator, vector<int>::iterator > resultSet = equal(s1.begin(), s1.end(), v1.begin());
cout<<*resultSet.first<<” “<<*resultSet.second<<endl;
return 0;
}
Program outputs:

 
 
 
 

Q62. What will happen when you attempt to compile and run the following code?
#include <deque>
#include <vector>
#include <iostream>
using namespace std;
class A
{
int a;
public:
A(int a) {this?>a = a; c++;}
~A() { c??;}
static int c;
};
int A::c(0);
int main ()
{
A t[] = {0, 1, 2, 3, 4, 5, 6, 7, 8 , 9};
vector<A>v1(t, t+10);
deque<A>d1(v1.begin(), v1.end());
deque<A> d2;
d2 = d1;
cout<<A::c<< endl;
return 0;
}
How many objects of type A will be created:

 
 
 
 

Q63. What will happen when you attempt to compile and run the code below, assuming that file test.out do not exist before the program execution?
#include <iostream>
# include <fstream>
# include <string>
# include <list>
# include <algorithm>
using namespace std;
template<class T>struct Out {
ostream & out;
Out(ostream & o): out(o){}
void operator() (const T & val ) {out<<val<<” “; } };
int main (){
int t[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
fstream f(“test.out”);
list<int> l(t, t+10);
for_each(l.begin(), l.end(), Out<int>(f));
f.close();
return 0;
}

 
 
 
 
 

Q64. What will happen when you attempt to compile and run the code below, assuming that you enter the following sequence: true false<enter>?
# include <iostream>
# include <string>
using namespace std;
int main ()
{
bool a,b;
cin>>boolalpha>>a>>b;
cout<<a<<b<<endl;
return 0;
}
Program will output:

 
 
 
 
 

Q65. What happens when you attempt to compile and run the following code? Choose all that apply.
# include <iostream>
# include <fstream>
# include <string>
# include <list>
# include <algorithm>
# include <iomanip>
using namespace std;
class B { int val;
public:
B(int v=0):val(v){}
int getV() const {return val;}
operator int() const { return val; };};
template<class T>struct Out {
ostream & out;
Out(ostream & o): out(o){}
void operator() (const T & val ) {out<<setw(3)<<hex<<val; } };
int main () {
int t[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
fstream f(“test.out”, ios::trunc|ios::out);
list<B> l(t, t+10);
for_each(l.begin(), l.end(), Out<B>(f));
f.close();
f.open(“test.out”);
for( ; f.good() ; ) {
int i;
f>>i;
cout<<i<<” “;
}
f.close();
return 0;
}

 
 
 
 
 

Q66. What will happen when you attempt to compile and run the following code?
#include <iostream>
using namespace std;
class C {};
template <class T>
class A {
T _v;
public:
A() {}
A(T v): _v(v){}
T getV() { return _v; }
void add(T a) { _v+=a; }
};
int main()
{
A<int> b;
A<C> a;
a.add(C());
cout << b.getV() <<endl;
return 0;
}

 
 
 
 

Q67. What happens when you attempt to compile and run the following code? Choose all that apply.
#include <vector>
#include <iostream>
using namespace std;
int main ()
{
vector<int>v1(10, 3);
v1.push_back(3);
cout<<v1.capacity()<<” “<< v1.size()<<endl;
return 0;
}

 
 
 
 

Q68. What happens when you attempt to compile and run the following code?
#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;
class B { int val;
public:
B(int v=0):val(v){}
int getV() const {return val;}
B operator +(const B &b )const { return B(val + b.val);} };
ostream & operator <<(ostream & out, const B & v) { out<<v.getV(); return out;} template<class T>struct Out { ostream & out; Out(ostream & o): out(o){} void operator() (const T & val ) { out<<val<<” “; } }; B Add(B a, B b) { return a+b; } int main() { int t[]={1,2,3,4,5,6,7,8,9,10}; vector<B> v1(t, t+10); vector<B> v2(10); transform(v1.begin(), v1.end(), v2.begin(), bind2nd(ptr_fun(Add),1)); for_each(v2.rbegin(), v2.rend(), Out<B>(cout));cout<<endl; return 0;
}
Program outputs:

 
 
 
 
 

Q69. What happens when you attempt to compile and run the following code?
# include <vector>
# include <iostream>
# include <algorithm>
# include <functional>
using namespace std;
class B { int val;
public:
B(int v=0):val(v){}
int getV() const {return val;}
B operator +(const B &b )const { return B(val + b.val);} };
ostream & operator <<(ostream & out, const B & v) { out<<v.getV(); return out;} template<class T>struct Out {
ostream & out;
Out(ostream & o): out(o){}
void operator() (const T & val ) { out<<val<<” “; } };
template<typename A> struct Add : public binary_function<A, A, A> {
A operator() (const A & a, const A & b) const { return a+b; }};
int main() {
int t[]={1,2,3,4,5,6,7,8,9,10};
vector<B> v1(t, t+10);
vector<B> v2(10);
transform(v1.begin(), v1.end(), v2.begin(), bind1st(ptr_fun (Add<B>()), 1)); for_each(v2.rbegin(), v2.rend(), Out<B>(cout));cout<<endl;
return 0;
}
Program outputs:

 
 
 
 
 

Q70. What happens when you attempt to compile and run the following code?
#include <list>
#include <deque>
#include <iostream>
using namespace std;
template<class T>
void print(T start, T end) {
while (start != end) {
std::cout << *start << ” “; start++;
}
}
int main()
{
int t1[] ={ 1, 7, 8, 4, 5 };
list<int> l1(t1, t1 + 5);
int t2[] ={ 3, 2, 6, 9, 0 };
deque<int> d1(t2, t2 + 5);
l1.sort();
d1.sort();
l1.merge(d1);
print(l1.begin(), l1.end());
print(d1.begin(), d2.end()); cout<<endl;
return 0;
}

 
 
 
 

Q71. What will happen when you attempt to compile and run the following code?
#include <deque>
#include <vector>
#include <iostream>
using namespace std;
int main ()
{
int t[] = {1, 2 ,3 ,4 ,5, 6 , 7, 8 , 9, 10};
deque<int>d1(t, t+10);
vector<int>v1(t, t+10);
cout<<v1.size()<<” “<<v1.capacity()<<” “;
cout<<d1.size()<<” “;<<d1.capacity()<<” “;
d1.resize(12); v1.resize(12);
cout<<v1.size()<<” “<<v1.capacity()<<” “;
cout<<d1.size()<<” “;<<d1.capacity()<<” “;
d1.reserve(20);v1.reserve(20);
cout<<v1.size()<<” “<<v1.capacity()<<” “;
cout<<d1.size()<<” “;<<d1.capacity()<<endl;
return 0;
}

 
 
 
 

Q72. What happens when you attempt to compile and run the following code?
#include <iostream>
#include <map>
#include <vector>
#include <sstream>
#include <string>
using namespace std;
int main(){
int t[] ={ 3, 4, 2, 1, 6, 5, 7, 9, 8, 0 };
vector<int> v(t, t+10);
map<int,string> m;
for(vector<int>::iterator i=v.begin(); i!=v.end(); i++) {
stringstream s; s<<*i<<*i; m.insert(pair<int,string>(*i,s.str()));
}
for(map<int, string>::iterator i=m.begin();i!= m.end(); i++) {
cout<<*i<<” “;
}
return 0;
}

 
 
 
 
 

Q73. What happens when you attempt to compile and run the following code?
# include <string>
# include <list>
# include <iostream>
using namespace std;
template<class T> void print(T start, T end) {
while (start != end) {
std::cout << *start << ” “; start++;
}
}
int main() {
string t1[] ={ “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”, “10”};
list<string> l1(t1, t1 + 10);
list<string> l2(l1);
l2.reverse(); l1.splice(l1.end(),l2);
l1.unique();
print(l1.begin(), l1.end()); cout<<endl;
return 0;
}

 
 
 
 

CPP – C++ Certified Professional Programmer

The CPP exam is part of the C++ Institute Certification. This exam measures your ability in Developing Professional Software in C++ language.

CPP is a professional certification that measures your skills to accomplish coding tasks related to the advanced programming in the C++ language and object-oriented patterns. A test candidate must demonstrate knowledge of the C++ template mechanism, understanding definitions of template functions and classe and using property template classes methods including third party templates. The candidate must be fluent with C++ STL library including the IO part, and solving common programming and algorithm problems with STL predefined classes and methods. This certification exam is targeted for professional expert in C++ language which years of experience. The certification is for functional consultants, and developers expert in Software Solution. So, the audience typically includes developers, implementation consultants, and team leads.

This is a list of covered topics:

  • STL merge operations;
  • STL Sequential containers;
  • STL Associative containers;
  • Templates;
  • STL Advanced I/O.
  • STL utilities and functional library;

 

Updated Official licence for CPP Certified by CPP Dumps PDF: https://www.examstorrent.com/CPP-exam-dumps-torrent.html

         

Related Links: myportal.utt.edu.tt myportal.utt.edu.tt myportal.utt.edu.tt myportal.utt.edu.tt myportal.utt.edu.tt myportal.utt.edu.tt

admin

Leave a Reply

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

Enter the text from the image below