Now C++ Institute CPP Latest Real Test certification test is very popular. Not having got CPP Latest Real Test certificate, you must want to take the exam. Indeed, C++ Institute CPP Latest Real Test test is very difficult exam, but this is not suggested that you cannot get high marks and pass your exam with ease. Without knowing the shortcut of C++ Institute CPP Latest Real Test exam, do you want to know the testing technique? As for the point, I can tell you that BraindumpStudy C++ Institute CPP Latest Real Test study guide is your unique choice.
Exam Name: C++ Certified Professional Programmer
One year free update, No help, Full refund!
CPP Latest Real Test Total Q&A: 230 Questions and Answers
Last Update: 2017-03-20
CPP Reliable Exam Guide Detail: CPP Latest Real Test
Our BraindumpStudy will provide you with the most satisfying after sales service. We provide one-year free update service to you one year after you have purchased CPP Latest Real Test exam software., which can make you have a full understanding of the latest and complete CPP Latest Real Test questions so that you can be confident to pass the exam. If you are unlucky to fail CPP Latest Real Test exam for the first time, we will give you a full refund of the cost you purchased our dump to make up your loss.
CPP Free Demo Download: http://www.braindumpstudy.com/CPP_braindumps.html
NO.1 What happens when you attempt to compile and run the following code?
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
template<class T>struct Out {
ostream & out;
Out(ostream & o): out(o){}
void operator() (const T & val ) { out<<val<<" "; } };
struct Add {
int operator()(int & a, int & b) {
return a+b;
}
};
int main() {
int t[]={1,2,3,4,5,6,7,8,9,10};
vector<int> v1(t, t+10);
vector<int> v2(10);
transform(v1.begin(), v1.end(), v2.begin(), bind1st(1,Add()));
for_each(v2.rbegin(), v2.rend(), Out<int>(cout));cout<<endl;
return 0;
}
Program outputs:
A. 2 3 4 5 6 7 8 9 10 11
B. 10 9 8 7 6 5 4 3 2 1
C. 11 10 9 8 7 6 5 4 3 2
D. compilation error
E. 1 2 3 4 5 6 7 8 9 10
Answer: D
CPP Papers
NO.2 What happens when you attempt to compile and run the following code?
#include <list>
#include <iostream>
using namespace std;
template<class T> void print(T start, T end) {
while (start != end) {
std::cout << *start << " "; start++;
}
}
class A {
int a;
public:
A(int a):a(a){}
operator int () const { return a;}int getA() const { return a;}
};
int main() {
int t1[] ={ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
list<A> l1(t1, t1 + 10);
list<A> l2(l1);
l2.reverse(); l1.splice(l1.end(),l2);
l1.pop_back();l1.unique();
print(l1.begin(), l1.end()); cout<<endl;
return 0;
}
A. compilation error
B. runtime exception
C. program outputs: 1 2 3 4 5 6 7 8 9 10 10 9 8 7 6 5 4 3 2
D. program outputs: 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2
E. program outputs: 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1
Answer: D
CPP Examcollection
没有评论:
发表评论