Question: Which of the following for statements is valid? Select the one correct answer. (a) int j = 10; for (int i = 0, j +=
Which of the following for statements is valid?
Select the one correct answer.
(a) int j = 10; for (int i = 0, j += 90; i < j; i++) { j-
-; }
(b) for (int i = 10; i = 0; i--) {}
(c) for (int i = 0, j = 100; i < j; i++, --j) {;}
(d) int i, j; for (j = 100; i < j; j--) { i += 2; }
(e) int i = 100; for ((i > 0); i--) {}
Step by Step Solution
3.42 Rating (155 Votes )
There are 3 Steps involved in it
c Only c contains a valid for loop The initialization in a for statement can contain either declar... View full answer
Get step-by-step solutions from verified subject matter experts
