CPP PDF

How to use our free PDF

Our Free PDF is based on the full mock exams which is available on our Web Site. The PDF consists in an extract of questions and answers with detailed explanations that are available to be:

  
C++ Institute CPP
C++ Certified Professional Programmer
C++ Institute CPP Dumps Available Here at:
http://blog.giftovus.com/?tell=c-plus-plus-institute-exam/cpp-dumps.html
Enrolling now you will get access to 228 questions in a unique set of CPP dumps
Question 1
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;
}
Options:
A. program outputs: 6 6
B. program outputs: 5 7
C. program outputs: 5 5 6 6 7 7 D. program outputs: 5 5 7 7
E. program outputs: 1 1 6 6 5 5 Answer: A
Question 2
 https://www.certification-questions.com

C++ Institute CPP
What happens when you attempt to compile and run the following code? #include 
#include 
#include 
using namespace std; templatestruct Out { ostream & out;
Out(ostream & o): out(o){}
void operator()(const T & val ) { out< v1(10);
generate(v1.rbegin(), v1.rend(), Sequence(1)); rotate(v1.begin(),v1.begin() + 1, v1.end() ); for_each(v1.begin(), v1.end(), Out(cout) );cout<
#include 
#include 
#include 
 https://www.certification-questions.com

C++ Institute CPP
#include  #include  using namespace std; class B { int val; public:
B(int v=0):val(v){}
int getV() const {return val;} operator int() const { return val; };};
templatestruct Out {
ostream & out;
Out(ostream & o): out(o){}
void operator() (const T & val ) {out< l(t, t+10);
for_each(l.begin(), l.end(), Out(f)); f.close();
f.open("test.out");
for( ; f.good() ; ) {
B i;
f>>i;
cout<? #include 
#include 
using namespace std;
int main ()
{
string a; cin>>a; cout<
#include 
#include 
#include  #include  using namespace std; int main() {
int t[] = { 3, 4, 2, 1, 0, 3, 4, 1, 2, 0 };
vector v(t, t + 10);
multimap m;
for (vector::iterator i = v.begin(); i != v.end(); i++) { stringstream s;s << *i << *i;
m.insert(pair(*i, s.str()));
}
pair::iterator, multimap::iterator> range; range = m.equal_range(2);
 https://www.certification-questions.com

C++ Institute CPP
for (multimap::iterator i = range.first; i != range.second; i++) { cout << i?>first << " ";
}
return 0;
}
The output will be:
Options:
A. 2 2
B. 1 2
C. 1 3
D. 2
E. 0 2 Answer: A
Question 6
What happens when you attempt to compile and run the following code? #include 
#include 
#include 
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<struct Out {
ostream & out;
Out(ostream & o): out(o){}
void operator() (const T & val ) { out< v1(10,0);
sort(t1, t1+5);
sort(t2, t2+5); set_intersection(t1,t1+5,t2,t2+5,v1.begin()); for_each(v1.begin(), v1.end(), Out(cout));cout<
#include 
#include 
using namespace std;
int main ()
{
int t[] = {1, 2 ,3 ,4 ,5}; vectorv1(t, t+5); listl1;
l1.assign(v1.end(), v1.begin()); for(int i=0; i
#include 
#include 
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 valstruct Out {
ostream & out;
Out(ostream & o): out(o){}
void operator() (const T & val ) { out< v1(10);
sort(t1, t1+5);
sort(t2, t2+5);
merge(t1,t1+5,t2,t2+5,v1.begin());
for_each(v1.begin(), v1.end(), Out(cout));cout<
#include 
#include 
using namespace std; class A {
int a;
public:
A(int a) : a(a) {}
int getA() const { return a; } void setA(int a) { this?>a = a; } /* Insert Code Here */
};
struct add10 { void operator()(A & a) { a.setA(a.getA() + 10); } };
int main() {
int t[] = { 10, 5, 9, 6, 2, 4, 7, 8, 3, 1 };
vector v1(t, t + 10);
for_each(v1.begin(), v1.end(), add10()); vector::iterator it = find(v1.begin(), v1.end(), A(7)); cout << it?>getA() << endl;
return 0;
}
Options:
A. it will compile and print 7
B. it will not compile
C. it will compile but the program result is unpredictable D. adding code:
bool operator !=(const A & b) const {
if (this?>a != b.a) { return true; } return false; } at Place 1 will allow the program to compile
Answer: B
Question 10
What happens when you attempt to compile and run the following code? #include 
#include 
 https://www.certification-questions.com

C++ Institute CPP
#include  using namespace std;
void myfunction(int i) { cout << " " << i;
}
void multiply (int a) { a*2;
}
int main() {
int t[] = { 10, 5, 9, 6, 2, 4, 7, 8, 3, 1 }; vector v1(t, t+10); for_each(v1.begin(), v1.end(), multiply); iter_swap(v1.begin(),t+9); for_each(v1.begin(), v1.end(), myfunction); return 0;
}
Program outputs:
Options:
A. 1 5 9 6 2 4 7 8 3 1 B. compilation error C. 1 2 3 4 5 6 7 8 9 10 D. 10 9 8 7 6 5 4 3 2 1 E. 10 5 9 6 2 4 7 8 3 1 Answer: A
Would you like to see more? Don't miss our CPP PDF file at:
http://blog.giftovus.com/?tell=c-plus-plus-institute-pdf/cpp-pdf.html
 https://www.certification-questions.com