What will the following programs print in do...while loop? - C Statement

C examples for Statement:do while

Description

What will the following programs print in do...while loop?

Demo Code

#include <stdio.h> 

int main(void) 
{ 
    char ch; /*from  w  w  w. ja  va 2  s  . c  o  m*/
 
    do { 
         scanf("%c", &ch); 
         printf("%c", ch); 
    } while ( ch != 'g' ); 
    return 0; 
}

Result


Related Tutorials