Originally Posted by
TheBigH
Your code is not going to compile because you do not have a main() function. If you're not getting any errors, you haven't shown us all your code because what you've posted up there is incomplete.
I'm guessing this program is supposed to read the contents of the file "emp.txt" and display them on the screen. Let me guess- it just prints the first letter over and over again endlessly? The reason for this is that the fgetc function is outside your while loop, and so it reads the first character but never reads another one. Put it inside the while loop, before the printf statement, and see what happens.