-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,615
  • 3
  • 29
  • 37
Gopal Sharma
  • 755
  • 1
  • 12
  • 25

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,783
  • 1
  • 31
  • 31