On Tue, Nov 07, 2006 at 06:19:59PM +0530, Naga Priya .K wrote:
> i'm a beginner in C. I used the following code to read and print the
> strings in a file. but the control doesn't reach inside the while
> loop. what is the problem?
The problem is that you don't initialise things correctly.
> i'm a beginner in C. I used the following code to read and print the strings
> in a file. but the control doesn't reach inside the while loop. what is the
> problem?
EOF == -1 and do not jump into the while loop
> FILE *FilesRead=fopen("FilesRead.txt","r");
>if(!FilesRead)
>pri
Hello,
i'm a beginner in C. I used the following code to read and print the
strings in a file. but the control doesn't reach inside the while
loop. what is the problem?
FILE *FilesRead=fopen("FilesRead.txt","r");
if(!FilesRead)
printf("File not opened");
else
printf("Op
3 matches
Mail list logo