For the 1st qn.. the o/p will print the code in the file and then print an infinite sequence of empty spaces. the reason is... In C EOF is defined to hold a value -1 which when assigned to unsigned becomes 255. So it goes in an unending loop even after encountering the end of file.
In second qn.. the file myfile.c will be closed. In third qn... It is not eof(fp) it is feof(fp) . There is no function eof defined in stdio.h. Use the correct function for files -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.