Get Started
553

Q:

Which of the following is not true for for-loop?

  • 1
    for (i=0; i
  • 2
    for (int i=0; i>9; i++)
  • 3
    for (i=10; i
  • 4
    for (i=10; i++; i
  • Show Answer
  • Workspace

Answer : 4. "for (i=10; i++; i"
Explanation :

Among the given statements about for loops, the one that is NOT true is that they are used to replace user input while loops. While for loops are typically used for iterations with a known count and are less likely to result in an infinite loop if used correctly, they do not specifically replace user input while loops.

The Most Comprehensive Exam Preparation Platform

Get the Examsbook Prep App Today