Also found in: Wikipedia.


The standard function in the C programming language library for printing formatted output.

The first argument is a format string which may contain ordinary characters which are just printed and "conversion specifications" - sequences beginning with '%' such as %6d which describe how the other arguments should be printed, in this case as a six-character decimal integer padded on the right with spaces.

Possible conversion specifications are d, i or u (decimal integer), o (octal), x, X or p (hexadecimal), f (floating-point), e or E (mantissa and exponent, e.g. 1.23E-22), g or G (f or e format as appropriate to the value printed), c (a single character), s (a string), % (i.e. %% - print a % character). d, i, f, e, g are signed, the rest are unsigned.

The variant fprintf prints to a given output stream and sprintf stores what would be printed in a string variable.

Unix manual page: printf(3).
References in periodicals archive ?
Everyonew antsap ieceo fher, evenif it'so nly fleeting- punters backedherat oddso f1-20inher last twostar tsj ust toh avea souvenir ticket,e venthou ght he printf adesawayaf terthr eey ears.
Unsurprisingly, Zami does not comprise "linear, solid blocks of printf Like Oranges Are Not the Only Fruit, much of the book proceeds via association instead of chronologically: Lorde works with themes rather than timelines.
n", dDiff); double dOneFile = dDiff / nCount; printf ("Vieno failo laikas %.
Code Trace delivers high accuracy profiling, interrupt statistics, interrupt tracing, RTOS event tracing, and a unique no-overhead host-strings viewing mechanism which provides printf style debugging and logging without intrusiveness.
Additionally, debug log messages from a printf output can be also displayed by IAR C-SPY, without having to halt the execution.
Additionally debug log messages from a printf output can be sent over the SWO channel and displayed by IAR C-SPY, without having to halt the execution.
The Diamond software tools contain software libraries that enable software developers to use standard C library functions such as printf to print out to the host PC and read/write from the hard disk of the host PC.