--- ravisankar kakumanu <[EMAIL PROTECTED]> wrote:

> Hi Friends,
> 
> Can you plzz tell me whats wrong with this code.
> 
> #include <stdio.h>
> #include <math.h>
> 
> main () {
> 
>  FILE *fp;
> 
>   fp = fopen("file.txt", "r");
>   if(fp==NULL){
>    printf("\n Cannot open file.txt file.\n");
>    exit(1);
>   }
>   else {
>    printf("\n file.txt File is Opened.\n");
> 
>   }
> }
> 
> The file.txt is not having any value but
> surprisingly iam getting the following message when
> i run the above code
> 
>  file.txt File is Opened.
> 
> Can you please tell me why iam getting this?
> 
> Thanks in advance.
> ss..
> 
> 
> 

An empty file CAN exists - a file without any data
values. 
.

Mickey M.
Construction Partner Inc.
http://www.constructionpartner.com


       
____________________________________________________________________________________
Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
 

Reply via email to