printf example:

#include <stdio.h>

int main( void)
{
  double x = 1.2;
  double y;

  y = x*x;

  printf( "in = %g, out = %g\n", x, y);

  return 0;
}

output:

in = 1.2, out = 1.44

Each % format acts like a placeholder for a value to be printed:

primary formats:

  char      %c
  int       %i             %6i   (width = 6)
  double    %e %f %g       %5.2f (width = 5, with 2 decimal places)

Table 2.6, page 44:

References: Linux, Open Group, C Standard