Originally Posted by
noahian
Hi guys,
I have just began the K&R book but i have trouble testing my code because it seems to me that the examples in the book assumes that when "getchar" is used, a char is fetched from a file.. though when i run the same code i manually have to type a string then hit enter to make that string get fetched by my code..
This poses a problem since many exercises use EOF to detect the end of available chars to get fetched and there is no way i can do that..
Anyway, i browsed through the previous pages to see if i missed something but could not come up with any explanation..
Is there something i am missing?
Thnx