Mega Code Archive

 
Categories / C / Console
 

Use getchar() in for loop

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