Take advantage of the Pass4Test's C++ Institute training materials to prepare for the exam, let me feel that the exam have never so easy to pass. This is someone who passed the examination said to us. With Pass4Test C++ Institute New CPP Exam Experience exam certification training, you can sort out your messy thoughts, and no longer twitchy for the exam. Pass4Test have some questions and answers provided free of charge as a trial. If I just said, you may be not believe that. But as long as you use the trial version, you will believe what I say. You will know the effect of this exam materials.
Exam Name: C++ Certified Professional Programmer
One year free update, No help, Full refund!
New CPP Exam Experience Total Q&A: 230 Questions and Answers
Last Update: 2017-03-17
CPP Certification Cost Detail: New CPP Exam Experience
In the past few years, C++ Institute certification New CPP Exam Experience exam has become an influenced computer skills certification exam. However, how to pass C++ Institute certification New CPP Exam Experience exam quickly and simply? Our Pass4Test can always help you solve this problem quickly. In Pass4Test we provide the New CPP Exam Experience certification exam training tools to help you pass the exam successfully. The New CPP Exam Experience certification exam training tools contains the latest studied materials of the exam supplied by IT experts.
CPP Free Demo Download: http://www.pass4test.com/CPP.html
NO.1 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. program outputs: 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1
B. program outputs: 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2
C. program outputs: 1 2 3 4 5 6 7 8 9 10 10 9 8 7 6 5 4 3 2
D. runtime exception
E. compilation error
Answer: B
CPP Duration
NO.2 What happens when you attempt to compile and run the following code?
#include <iostream>
#include <algorithm>
#include <vector>
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; }
bool operator==(const A & b) const { return a == b.a; }
};
bool compare(const A & a, const A & b) { return a == b; }
int main () {
int t[] = {1,2,3,3,5,1,2,4,4,5};
vector<A> v (t,t+10);
vector<A>::iterator it = v.begin();
while ( (it = adjacent_find (it, v.end(), compare)) != v.end()) {
cout<<it?v.begin()<<" ";it++;
}
cout<< endl;
return 0;
A. program will run forever
B. program outputs: 3 8
C. program outputs: 2 7
D. program outputs: 2 3
E. compilation error
Answer: C
CPP Test
没有评论:
发表评论