Format |
Output |
Input |

%c |
character |
character |

%*n*c |
character, right adjusted to a space of *n* characters, filled with spaces |
*n* characters |

%-*n*c |
character, left adjusted to a space of *n* characters, filled with spaces |
not allowed |

%d, %i |
integer |
integer |

%ld,%li |
not allowed |
long integer |

%hd,%hi |
not allowed |
short integer |

%*n*d,%*n*i |
integer, right adjusted to a space of *n* characters |
not allowed |

%-*n*d,%-*n*i |
integer, left adjusted to a space of *n* characters |
not allowed |

%0*n*d,%0*n*i |
as %*n*d,%*n*i, but spaces are pedded with 0 |
not allowed |

%u |
unsigned integer (%lu,%hu,%*n*u,%-*n*u,%0*n*u as for integer) |
unsigned integer |

%o |
unsigned octal integer (%lo,%ho,%*n*o,%-*n*o as for integer) |
unsigned octal |

%x |
unsigned hex integer (%lx,%hx,%*n*x,%-*n*x as for integer) |
unsigned hex |

%X |
as %x |
as %x |

%e |
floating point (scientific format) |
floating point |

%*n*.*m*e |
floating point (scientific format) of length *n* and *m* digits |
not allowed |

%-*n*.*m*e |
as %*n*.*m*e but left adjusted |
not allowed |

%E |
as %e but capital E in output (same for %*n*.*m*E and %-*n*.*m*E) |
floating point |

%f |
as %f but in fixed format (same for %*n*.*m*f and %-*n*.*m*f) |
floating point |

%g |
%f or %e, what ever is shorter (same for %*n*.*m*g and %-*n*.*m*g) |
floating point |

%G |
%f or %E, what ever is shorter (same for %*n*.*m*G and %-*n*.*m*G) |
floating point |

%le,%lE,%lf,%lg,%lG |
not allowed |
double |

%Le,%LE,%Lf,%Lg,%LG |
not allowed |
long double |

%s |
string |
string |

%*n*s |
string with total space of *n* characters |
string from first *n* characters. |

%*n*.*m*s |
string with total space of *n* characters and length of *m* characters |
not allowed |

%p |
hex value of pointer |
not allowed |

%% |
%-symbol |
match %-symbol |

%[*characters*] |
not allowed |
string of reduced characters set |

%[^*characters*] |
not allowed |
string with excluding character set. |