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:
Code:
fp = fopen(full_filename, "w+");
char str[128];
sprintf(str, "%d ", Variable);
fprintf(fp, str);
and using directly fprintf in the following way:
Code:
fprintf(fp ," %d", Variable);
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.
Thank you in advance
CFD