Getchar.c

#include <stdio.h>
#define EOL 10
#define ESC 27
main() {
  char c = 'X';
  while (c != ESC) {
    int cnt;
    cnt++;
    printf("iteration of test %d", cnt);
    c = getchar();
  }
  return 0;
}
Last modified on 24 May 2007, at 22:17