I was going through The C programming Language by K&R. Here in a statement to print a double variable it is written
printf(\"\\t%g\\n\", sum += atof(lin
They are both examples of floating point input/output.
%g and %G are simplifiers of the scientific notation floats %e and %E.
%g will take a number that could be represented as %f (a simple float or double) or %e (scientific notation) and return it as the shorter of the two.
The output of your print statement will depend on the value of sum.