Computer Science, asked by nalinimaha82, 4 months ago

is it necessary to have all 3 expressions in for loop?​

Answers

Answered by Anonymous
1

Answer:

All these components are optional. In fact, to write an infinite loop, you omit all three expressions: for ( ; ; ) { //infinite loop ... } ... If the variable that controls a for loop is not needed outside of the loop, it's best to declare the variable in the initialization expression.

Answered by noorpreet4388
2

Answer:

All these components are optional. In fact, to write an infinite loop, you omit all three expressions: for ( ; ; ) { //infinite loop ... } ... If the variable that controls a for loop is not needed outside of the loop, it's best to declare the variable in the initialization expression.

Similar questions