C++ Institute CPP Exam - Topic 3 Question 31 Discussion
What happens when you attempt to compile and run the following code?#include #include #include using namespace std;int main(){int myints[] ={ 3, 4, 2, 1, 6, 5, 7, 9, 8, 0 };vectorv(myints, myints+10);set s1(v.begin(),v.end());set s2(v.begin(), v.end());for(set::iterator i=s1.begin();i!= s1.end(); i++) {cout
C) program outputs: 0 1 2 3 4 5 6 7 8 9 9 8 7 6 5 4 3 2 1 0
A) program outputs: 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
B) program outputs: 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
D) program outputs: 9 8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9
Tenesha
9 months agoPhuong
9 months agoNu
9 months agoHyun
9 months agoLuisa
9 months agoDesmond
10 months agoAllene
10 months ago