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
7 months agoPhuong
7 months agoNu
7 months agoHyun
8 months agoLuisa
8 months agoDesmond
8 months agoAllene
8 months ago