I’m on Windows 7.
My question pertains to the ‘percent codes’ used to specify what type of number you would like to output when calling printf. For example: %d is commonly used for ‘int’s, %f for ‘float’s and so on.
Where can a conclusive list of these be found? I’ve perused all of the printf files in my MinGW folder to no avail. I have also looked through the GCC Manual but couldn’t seem to find what I was looking for.
Also, is there a specific name or anything associated with the subject of my question? It’s hard to find answers on the Internet without knowing exactly how to ask the question.
Any references to related resources for continued reading would be highly appreciated as well.
Thanks in advance!
They’re called format strings. You can find the information you’re looking for in the
printfman page: http://linux.die.net/man/3/printfIt’s a standard C function, so everything is mostly the same between Linux and Windows. Note however the standard in which each flag/conversion/etc is specified, Windows’ C library only supports C89.
The place where everything is actually specified is the C specification.