ExamVeda
Login
Home
11
In C++, what is the difference between the 'while' loop and the 'do-while' loop?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
12
What is the purpose of the 'if-else if-else' statement in C++?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
13
What will be the output of the following code: for (int i = 0; i < 3; ++i) { for (int j = 0; j < 2; ++j) { cout << i << j << " "; } }?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
14
What is the syntax for the 'if-else' statement in C++?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
15
What does the 'else if' statement allow in C++?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
16
What is the output of the following code: int x = 10; if (x == 10) { cout << "x is 10"; } else { cout << "x is not 10"; } in C++?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
17
What is the purpose of the 'continue' statement in a loop in C++?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
18
What will be the output of the following code: int i = 0; while (i < 3) { cout << i << " "; i++; } in C++?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
19
What is the purpose of the 'break' statement in a loop in C++?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
20
What will be the output of the following code: for (int i = 0; i < 5; ++i) { if (i == 2) continue; cout << i << " "; } in C++?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board