GrabCert
HomeExamsProvidersAbout
Sign InSign Up
Home/Exams/C++ Institute C++ Certified Professional Programmer/Question #1
#1Multiple Choice

What happens when you attempt to compile and run the following code?
#include <iostream>
#include <set>
#include <vector>
using namespace std;
int main(){
int t[] ={ 3, 4, 2, 1, 6, 5, 7, 9, 8, 0 };
vector<int>v(t, t+10);
multiset<int> s1(v.begin(),v.end());
s1.insert(v.begin(),v.end());
pair<multiset<int>::iterator,multiset<int>::iterator> range; range = s1.equal_range(6); while (range.first != range.second) { cout<<*range.first<<" "; range.first++;
}
return 0;
}

Previous
Question 1 of 228
Exam CPP Topic 1 Question 1
Back to all questions
Next
GrabCert

Your trusted source for certification exam preparation. Pass your exams with confidence.

Quick Links

  • Home
  • Exams
  • Providers

Legal

  • About
  • Contact Us
  • Refund Policy
  • Privacy Policy
  • Terms of Service

© 2026 GrabCert. All rights reserved.

Sign InSign Up