FreeQAs
 Request Exam  Contact
  • Home
  • View All Exams
  • New QA's
  • Upload
PRACTICE EXAMS:
  • Oracle
  • Fortinet
  • Juniper
  • Microsoft
  • Cisco
  • Citrix
  • CompTIA
  • VMware
  • ISC
  • SAP
  • EMC
  • PMI
  • HP
  • Salesforce
  • Other
  • Oracle
    Oracle
  • Fortinet
    Fortinet
  • Juniper
    Juniper
  • Microsoft
    Microsoft
  • Cisco
    Cisco
  • Citrix
    Citrix
  • CompTIA
    CompTIA
  • VMware
    VMware
  • ISC
    ISC
  • SAP
    SAP
  • EMC
    EMC
  • PMI
    PMI
  • HP
    HP
  • Salesforce
    Salesforce
  1. Home
  2. C++ Institute Certification
  3. CPP Exam
  4. C++Institute.CPP.v2022-12-07.q117 Dumps
  • ««
  • «
  • …
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • …
  • »
  • »»
Download Now

Question 71

What happens when you attempt to compile and run the following code?
# include <iostream>
# include <set>
# include <vector>
using namespace std;
int main(){
int myints[] ={ 3, 4, 2, 1, 6, 5, 7, 9, 8, 0 };
vector<int>v(myints, myints+10);
set<int> s1(v.begin(),v.end());
set<int, greater<int> > s2(v.begin(), v.end());
for(set<int>::iterator i=s1.begin();i!= s1.end(); i++) {
cout<<*i<<" ";
}
for(set<int, greater<int> >::iterator i=s2.begin();i!= s2.end(); i++) { cout<<*i<<" ";
}
cout<<endl;
return 0;
}

Correct Answer: C
insert code

Question 72

What happens when you attempt to compile and run the following code?
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
void print(int v) { cout<<v<<" "; }
struct Sequence {
int start;
Sequence(int start):start(start){}
int operator()() {
return 10*(1+(start++ %3));
}
};
int main() {
vector<int> v1(10);
generate_n(v1.begin(), 10, Sequence(1));
remove(v1.begin(), v1.end(), 10);
for_each(v1.begin(), v1.end(), print);cout<<endl;
return 0;
}
Program outputs:

Correct Answer: A
insert code

Question 73

What happens when you attempt to compile and run the following code?
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
struct Compare {
bool operator ()(int a) {
if (a >5) return true;
return false;
}
};
int main () {
int t[] = {1,2,3,2,3,5,1,2,7,3,2,1,10, 4,4,5};
vector<int> v (t,t+15);
int number = count(v.begin(), v.end(), Compare());
cout<< number<<endl;
return 0;
}
Program outputs:

Correct Answer: D
insert code

Question 74

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 t[]={3,2,4,1,5,6,10,8,7,9};
vector<int> v1(t, t+10);
for_each(v1.begin(), v1.end(), bind1st(plus<int>(), 1));
for_each(v1.rbegin(), v1.rend(), Out<int>(cout));cout<<endl;
return 0;
}
Program outputs:

Correct Answer: A
insert code

Question 75

What happens when you attempt to compile and run the following code?
#include <vector>
#include <set>
#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<<" "; } };
bool Greater(int v1, int v2) { return v1<v2; }
int main() {
int t[]={8, 10, 5, 1, 4, 6, 2, 7, 9, 3};
vector<int> v1(t, t+10);
sort(v1.begin(), v1.end(), Greater);
for_each(v1.begin(), v1.end(), Out<int>(cout));cout<<endl;
return 0;
}
Program outputs:

Correct Answer: B
insert code
  • ««
  • «
  • …
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • …
  • »
  • »»
[×]

Download PDF File

Enter your email address to download C++Institute.CPP.v2022-12-07.q117 Dumps

Email:

FreeQAs

Our website provides the Largest and the most Latest vendors Certification Exam materials around the world.

Using dumps we provide to Pass the Exam, we has the Valid Dumps with passing guranteed just which you need.

  • DMCA
  • About
  • Contact Us
  • Privacy Policy
  • Terms & Conditions
©2026 FreeQAs

www.freeqas.com materials do not contain actual questions and answers from Cisco's certification exams.