Searching for workable clues to ace the C++ Institute CPP Exam? You’re on the right place! ExamCert has realistic, trusted and authentic exam prep tools to help you achieve your desired credential. ExamCert’s CPP PDF Study Guide, Testing Engine and Exam Dumps follow a reliable exam preparation strategy, providing you the most relevant and updated study material that is crafted in an easy to learn format of questions and answers. ExamCert’s study tools aim at simplifying all complex and confusing concepts of the exam and introduce you to the real exam scenario and practice it with the help of its testing engine and real exam dumps
What happens when you attempt to compile and run the following code?
#include
#include
int main ()
{
int t[]={1,2,3,4,5};
std::vector
std::vector
v1.resize(10);
v2.reserve(10);
std::vector
while (i != v1.end()) { std::cout<<i[ii]<<" ";ii??;i++; }
i = v2.begin();ii=0;
while (i != v2.end()) { std::cout<<i[ii]<<" ";ii??;i++; }
return 0;
}
What happens when you attempt to compile and run the following code?
#include
#include
#include <algorithm>
using namespace std;
template
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[]={5,6,8,2,1};
vector
sort(t1, t1+5);
sort(t2, t2+5);
set_difference(t1,t1+5,t2,t2+5,v1.begin());
for_each(v1.begin(), v1.end(), Out
return 0;
}
Program outputs: