main()
{
FILE *fp=fopen("ras.txt","r");
float a[50],ch;
int i=0;
while(!feof(fp))
{
fscanf(fp,"%f",ch);
a[i++]=ch;
}
}by ShunmugaSundaram.P No Thing is Nothing --- On Wed, 3/25/09, rasheed abdul <[email protected]> wrote: From: rasheed abdul <[email protected]> Subject: [c-prog] Plz clear my doubts To: [email protected] Date: Wednesday, March 25, 2009, 3:50 AM Dear Sir/ Madam, I am want to acess float value in a file. For eg. If I have a file named ras.txt, which contains float value as follows, 12.589 0.2356 1.235 0.123 then I want to store this float values in array a[10]. I need a detailed explanation in this. Please help me to recover from this.... With regards, M. Rasheed Check out the all-new Messenger 9.0! Go to http://in.messenger .yahoo.com/ [Non-text portions of this message have been removed] [Non-text portions of this message have been removed]
