Table of Contents Previous topic Next topic
COMPILER LIBRARY FUNCTIONS->Detailed Descriptions->printf()
Summary
#include <stdio.h>
int printf(const char *format, ...);
Parameters
format | Format control string |
... | Optional arguments to be converted and printed |
Character | Argument type | Converted to |
d,i | int | signed decimal notation |
o | unsigned int | octal notation (without a leading zero) |
x | unsigned int | hexadecimal notation (without a leading 0X) |
u | uUnsigned int | unsigned decimal notation |
c | int | single character, after conversion to unsigned char |
s | char * | characters in the string are printed until the null character is reached or until the number of characters indicated by the precision specification have been printed. |
e,E | double | decimal notation of the form [-]m.dddddE-xx (E can be lower case) where the number of d's is specified by the precision. The default precision is 6. A precision of 0 suppresses the decimal point. |
f | double | decimal notation of the form [-]mmm.ddd where the number of d's is specified by the precision. The default precision is 6; a precision of 0 suppresses the decimal point. |
g,G | double | %e or %E is used if the exponent is less than -4 or greater than or equal to the precision, otherwise %f is used. |