Vidyalelo
Java Programming · Q22

Flow Control

Programming · Java Programming · question 22

Q22

What is the output of the following code snippet?int n = 5;for (int i = 0; i < n; i++) System.out.print(i + " ");

A.
5 4 3 2 1
B.
0 1 2 3 4
Answer
C.
1 2 3 4 5
D.
5 4 3 2 1 0

Answer: Option B

Solution

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