Code:
#include<stdio.h>
int main()
{
FILE *pfile;
char my[200];
pfile=fopen("my1.txt","r");
if(pfile==NULL) perror("error in opening file");
else {
fgets(my,200,pfile);
puts(my);
fclose(pfile);
}
return(0);
}
i/p file is this
30,25,25,301,301,301,295,294,291,289,288,288,285,2 67,244,211,142,93,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,2,1,1,1,940.0000,S
P,86.4000,1,2,O ,HAWAII-NORTH AMERICA,HNL ,ORD ,HNL ,ORD ,,,2,0,UA,,2008-02-20,2008-02-20,2009-01-08,,O,,UA,,1,10079,0,36
,0,312,0,0,0,70,70,72,XA,0,0,0,0,0,0,0,0,0,0,0,189 9-12-31,,1,1899-12-31,15,0,89,0,0,0,1208.0000,782.0000,940.0000, 0.0000, 0.
0000, 0.0000,282.0000,577.0000,419.0000,429.0000,669.000 0,616.0000,480.0000,380.0000,347.0000,305.0000,289 .0000,241.0000,306,
0,11,0,82,88.7694,0,0,0, 0.0000,72.0000,2,0,6,499.0000, 0.0000,0,0,0,HAW,Hawaii,65.0000,, 0.0000,

0/p i am getting is
30,25,25,301,301,301,295,294,291,289,288,288,285,2 67,244,211,142,93,0,0,0,

The above c binary is reading only first line.
I want to get all lines in .txt file what the the problem in the code.please help me I am new to c programing.

Thanks & Regards ,
Vijay,