I am a newbee writing a C program for school where the input is redirected to a file. I am to use getchar() only to retrieve the information. I am using Windows Visual 2008 and I cannot figure out why my code will not exit the loop. Can anyone help me out? Thanks.
while (rec != 'EOF') { while (rec != '\n') { variable=getchar; printf ("this is variable %c"); } }