Multiple choice technology programming languages

How do you write an infinite loop using the for statement

  1. while(true){ }

  2. for(i=0;i>1;i--){ i++ }

  3. for ( ; ; ) { }

  4. while(false){ }

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In C-style languages like Java and C++, 'for ( ; ; )' is the standard syntax for an infinite loop using a for statement, as all three components (initialization, condition, and increment) are optional and default to true.