Mask-group

Multiple Initializations in the for Loop

Multiple Initializations in the for Loop



  • The initialization expression of the for loop can contain more than one statement separated by the comma.
    Eg: for(i=1,j=2;j<10;j++).

  • Multiple statements can also be used in incrementation/decrementation expression of for loop.

  • Only one expression is allowed in the test expression.