In the next code:
#include
int main(void) {
int c;
while ((c=getchar())!= EOF)
putchar(c);
return 0;
}
getchar() is a standard function that on many platforms requires you to press ENTER to get the input, because the platform buffers input until that key is pressed. Many compilers/platforms support the non-standard getch() that does not care about ENTER (bypasses platform buffering, treats ENTER like just another key).