I think you should not call fgetc() in a for loop , it should be called in a while loop till EOF.
Type: Posts; User: ratneshp
I think you should not call fgetc() in a for loop , it should be called in a while loop till EOF.
You second try doesn't make any sense. I think it is completely wrong and it is going nowhere. You first logic was correct.
I don't think there is any problem is the code , I checked the same cod in the vc++ and it is working fine.
I am just giving the code snippet of what I tried in hurry:-
#include<stdio.h>
void...