Re: The contents of the file is not read..

2006-11-07 Thread Steve Kemp
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.

Re: The contents of the file is not read..

2006-11-07 Thread Michael Ott
> 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

The contents of the file is not read..

2006-11-07 Thread Naga Priya .K
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