hii,
i am working in c and my problem is that i have created a file which contains numbers,i want to store these numbers in an array.,please guide me how to go about it this is the part of code that i have written ,it is showing hundred numbers but all values are same and it shows 277 866 100 times.
while((ch=fgetc (fp)!=NULL)
{
for(i=0;i<10;i+ +)
for(j=0;j<10;j+ +)
{
image[i][j]=ch;
printf("%d %d",image[i][j]);
}
i am working in c and my problem is that i have created a file which contains numbers,i want to store these numbers in an array.,please guide me how to go about it this is the part of code that i have written ,it is showing hundred numbers but all values are same and it shows 277 866 100 times.
while((ch=fgetc (fp)!=NULL)
{
for(i=0;i<10;i+ +)
for(j=0;j<10;j+ +)
{
image[i][j]=ch;
printf("%d %d",image[i][j]);
}
Comment