Which one of these for statements is valid?.
Select the one correct answer.
(c)
Only (c) contains a valid for loop.
The initializer in a for statement can contain either declarations or a list of expression statements, but not both as attempted in (a).
The loop condition must be of type boolean.
(b) tries to use an assignment of an int value (notice the use of = rather than ==) as a loop condition and is, therefore, not valid.
The loop condition in the for loop (d) tries to use the uninitialized variable i, and the for loop in (e) is syntactically invalid, as there is only one semicolon.