Mega Code Archive

 
Categories / C / Language Basics
 

Use getchar inside while loop

#include <stdio.h> #include <conio.h> int main(void) {   char ch;   ch = getchar();   while(ch!='e')       ch = getchar();   printf("Found the e.");   return 0; }