int c;
c = getchar();
while ((c = getchar()) != EOF)
putchar(c);
c = getchar();
I know EOF means end of file. Basically, I believe this functions is instructed to keep inputing text from the keyboard until EOF becomes the subsequent input. However, I am not sure what EOF is on the keyboard or what triggers it.
Also, I am trying to understand why c has to be an integer and not a character for EOF.