Do while with char value as condition : Do While « Language Basics « C / ANSI-C






Do while with char value as condition



#include <stdio.h>

main()
{
  char ch;

  ch = 'a';

  do 
     printf ( "%c", ch ); 
  while ( ch++ < 'z' );
  
  printf ( "\n" );
}


           
       








Related examples in the same category

1.Reversing the digits: do whileReversing the digits: do while
2.Do while loopDo while loop
3.A flag: informs a certain condition has occuredA flag: informs a certain condition has occured
4.Do while loop for your selection
5.Do while loop with continueDo while loop with continue
6.Nested for loop inside a do while loop