Do while loop execute the loop body at least once - C Statement

C examples for Statement:while

Description

Do while loop execute the loop body at least once

Demo Code

#include <stdio.h> 
int main()//from  w  w w . ja v  a2  s . c  o m
{ 
   int x = 10; 
   do { 
      printf("This printf statement is executed at least once\n"); 
      x++; 
  }  while ( x < 10 ); //end do while loop 
}

Result


Related Tutorials