-1

Below is a sample code

while ((c = getchar()) != EOF) 
{ 
      putchar(c);  
}

I can understand most of the part but not that EOF (End of file).

P̲̳x͓L̳
  • 3,547
  • 3
  • 28
  • 37
Gopal Sharma
  • 715
  • 1
  • 15
  • 24

1 Answers1

1

It's easy. The EOF is a constant equal to -1 which is returned by getchar() when the standard input has reached the and and cannot give you many more characters.

Pavel Šimerda
  • 5,062
  • 1
  • 27
  • 31