Vidyalelo
C++ Programming · Q7

Control Flow Statements in C++

Programming · C++ Programming · question 7

Q7

What will be the output of the following code: int i = 0; while (i < 5) cout << i << " "; i++; in C++?

A.
Compilation error
B.
1 2 3 4
C.
0 1 2 3
D.
0 1 2 3 4
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board