hi
i want to write an array of numbers (for example from 0 to 14) in a file
the source is something like that:
FILE *fp;
fp=fopen(“output.txt”,”w”);
for(int i=0;i<15;i++)
{a[i]=i;
fprintf(fp,”%f\n”,a[i]);
}
fclose(fp);
no output is printed.can anybody say what is the problem?
when i open the text file the output is there.
But it is not appearing in the output page when i run the program.
the function of fprintf statement is suppose to print output in both. is’nt it ?
Read…
http://php.net/manual/en/function.f…
try…
fprintf: Writes to the specified stream a sequence of data formatted as the format argument specifies.
No, it does not.