• Call Us: +91 9437911966
  • Email Us: info@studentstutorial.com
  • Home
  • C Examples
  • Server Side
    • PHP
    • Java
    • CodeIgniter
    • Laravel
    • JSP
    • JDBC
  • Frontend
    • HTML
    • CSS
    • Javascript
    • jQuery
    • AJAX
    • FPDF
    • TCPDF
  • APP & DB
    • Android
    • Cordova
    • SQL
    • Oracle
  • Project
C Tutorial C Introduction C Characteristic C Comments C Operator C Assign Operator C Arithmetic Oper.. C Logical Operator C Modulus Operator C Variable C Initialise Variable C Print F C Translators C Programming C Control Flow C If Else Statement C Nested If Else C Loops C While Loops C For Loops C Do While C Nested Loops

C While loop

  • Students Tutorial
  • 08 jun 2020
   

When we are working while the loop pre-checking process occurs i.e. before execution of statements block condition part is executed.

While loop always repeats in clock direction.

Assignment;

 While (condition)

  {

   Statement 1;

  Statement 2;

   - - -
   
 Increment / decrement;

}

Acc to syntax “while” condition is true then control will pass within the body.

After execution of the body once again control will pass back to the condition and until the condition because false body will be repeated n no.of times.

When the condition becomes false, then control will pass outside of the body, if condition is not false, then it becomes an infinite loop.

Void main ( )

{

Int I;

I=j;

While (i<=10)

{

 Print f (“% d”, i);

  I = i+2;

 }

}

   O/p: 1 3 5 7 9

Student Tutorial is a online tutorial for web design and development. Here you can find easy example and explanation for each tutorial.
Copyright © 2016-2023 Student Tutorial

Server Side

  • PHP
  • Java
  • CodeIgniter
  • Laravel
  • JSP
  • JDBC

Frontend

  • HTML
  • CSS
  • Javascript
  • jQuery
  • AJAX
  • FPDF

App & Database

  • Android
  • Cordova
  • SQL
  • Oracle