when you are taking value from user using you must use the %f used for float values am sending you the code and it will surely work i use it before #include<stdio.h> #include<conio.h> void main() { float a[10]; int i,n; clrscr(); printf("enter the size of an array"); scanf("%d",&i); printf("enter the %d elements",i); for(n=0;n<i;n++) { scanf("%f",&a[n]); } printf("the array is...."); for(n=0;n<i;n++) { printf("%f\n",a[n]); } getch(); }
________________________________ From: rasheed abdul <rashu_76...@yahoo.com> To: c-prog@yahoogroups.com Sent: Tuesday, March 24, 2009 8:50:38 PM Subject: [c-prog] Plz clear my doubts 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]