Q723
What will be the output of the following C++ code? #include #include #include using namespace std; int main () int first[] = 5, 10, 15; int second[] = 50, 40, 30; vector v(4); vector :: iterator it; sort (first, first + 3); sort (second, second + 3); it = set_symmetric_difference (first, first + 2, second, second + 2, v.begin()); v.resize(it - v.begin()); for (it = v.begin(); it != v.end(); ++it) cout << ' ' << *it; return 0;
A.
5 10
B.
30 40
C.
50 40
D.
5 10 30 40
AnswerAnswer: Option D
Solution
Answer: Option D
No explanation is given for this question Let's Discuss on Board