Author: raman kumarraman kumar
Date: May 22, 2008 14:53
i want to read complete ascii file, i am reading it using file pointer
&
but problem is that , the file pointer is not coming to EOF , it's
just holding the last value
how can solve that problem
here is sample code
fp=fopen("inputfile","r");
while(fp!=EOF)// this is contineously looping , what is condition to
get out of loop at the EOF
{
fpscanf(fp,"%%s",str);
}
--
comp.lang.c.moderated - moderation address: clcm@ plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line. Sorry.
|