Home | History | Annotate | Download | only in io
      1 #include <stdio.h>
      2 
      3 int main(int argc, char const *argv[]) {
      4     printf("Hello world.\n");
      5     char line[100];
      6     int count = 1;
      7     while (fgets(line, sizeof(line), stdin)) { // Reading from stdin...
      8         fprintf(stderr, "input line=>%d\n", count++);
      9         if (count > 3)
     10             break;
     11     }
     12 
     13     printf("Exiting now\n");
     14 }
     15