The second parameter is the format string after which the format arguments follow:
fprintf(fPointer, "%f", amount);
%f
tells fprintf
to write this argument (amount
) as string representation of the float value.
A list of possible format specifiers can (for example) be found here.