hi all, I have decided to go back to basics because i seem to be missing some fundamental steps somewhere. I am working my way though the k&r book and have come across a sample code that doesn't work for me (it should work because the exercise is to modify it to find the value of EOF
when i run this i get stuck in an endless loop ie EOF is never foundCode:#include <stdio.h> #include <stdlib.h> int main() { int c; c=getchar(); while (c != EOF) { putchar(c); c=getchar(); } return 0; }
many thanks
Coop