While Loop : Looping Syntax in C Programming



While Loop Syntax :

initialization;
while(condition)
{
----------
----------
----------
----------
----------
------
incrementation;
}

Note :

  • For Single Line of Code - Opening and Closing braces are not needed.
  • while(1) is used for Infinite Loop
  • Initialization , Incrementation and Condition steps are on different Line.
  • While Loop is also Entry Controlled Loop.[i.e conditions are checked if found true then and then only code is executed ]