Q395
What will be the output of the following C++ code? #include #include using namespace std; int main () unsigned int i; vector first; vector second (4, 100); vector third (second.begin(), second.end()); vector fourth (third); int myints[] = 16, 2, 77, 29; vector fifth (myints, myints + sizeof(myints) / sizeof(int) ); for (vector :: iterator it = fifth.begin(); it != fifth.end(); ++it) cout << ' ' << *it; return 0;
A.
16
B.
16 2
C.
16 2 77
D.
16 2 77 29
AnswerAnswer: Option D
Solution
Answer: Option D
No explanation is given for this question Let's Discuss on Board