Hi, I have a question that may be dealing with efficiency in programming:
What is the conceptual difference between writing to files in the two steps:
and using directly fprintf in the following way:Code:fp = fopen(full_filename, "w+"); char str[128]; sprintf(str, "%d ", Variable); fprintf(fp, str);
Is the first better for memory saving in some way? I usually use the second option, but starting wondering when I saw other people using option 1.Code:fprintf(fp ," %d", Variable);
Thank you in advance
CFD



LinkBack URL
About LinkBacks


