%#x (or %#llx), in C language format string - Stack Overflow and wpollock
I was looking up %#llx (which I found nowhere, even using SymbolHound). But this is close enough (for x, # causes value to be prepended by 0x). It's a new one on me :-)
The character % is followed by zero or more of the following flags:
# The value should be converted to an ‘‘alternate form’’. For o conversions, the first character of the output string is made zero (by prefixing a 0 if it was not zero already). For x and X conversions, a non-zero result has the string ‘0x’ (or ‘0X’ for X conversions) prepended to it. For a, A, e, E, f, F, g, and G conversions, the result will always contain a decimal point, even if no digits follow it (normally, a decimal point appears in the results of those conversions only if a digit follows). For g and G conversions, trailing zeros are not removed from the result as they would otherwise be. For other conversions, the result is undefined.conversions, the result is undefined.
And more specifically related to %#llx (new as of C99):
ll
(This is the letters ell-ell and not the digits one-one.) The same as hh, except ll specifies the argument is a long long or unsigned long long. (New as of C99.)
No comments:
Post a Comment