Every time I want to query the file of a C-library function, I always search for it online and then see it in my blog. You have to read several articles before you can find them.
This is not a solution. Windows has msdn and Linux has man. Why not use it?
1. Check man's Manual description. Man is a verb, a noun, or an adjective)
$ Man
The table below shows the section numbers of the manual followed by the types of pages they contain. 1 Executable programs or shell commands 2 System calls (functions provided by the kernel) 3 Library calls (functions within program libraries) 4 Special files (usually found in /dev) 5 File formats and conventions eg /etc/passwd 6 Games 7 Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7) 8 System administration commands (usually only for root) 9 Kernel routines [Non standard]
As you can see, the fourth is the library function manual.
2. view the printf header file
$ MAN 3 printf
View format specifiers and search for specifier
The conversion specifier A character that specifies the type of conversion to be applied. The conversion specifiers and their meanings are: d, i The int argument is converted to signed decimal notation. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty. o, u, x, X The unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.
View the header file.
PRINTF(3) Linux Programmer's Manual PRINTF(3)NAME printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - formatted output conversionSYNOPSIS #include <stdio.h> int printf(const char *format, ...); int fprintf(FILE *stream, const char *format, ...);
If direct:
$ Man printf
The default display is 1st: executable programs or shell commands.
1 executable programs or shell commands