开发者

Alternate format specifiers for long long in C

开发者 https://www.devze.com 2022-12-23 07:10 出处:网络
Is there any other (alternative) format specifiers for long long in C other开发者_高级运维 than %lld which can be safely used in scanf under gcc?

Is there any other (alternative) format specifiers for long long in C other开发者_高级运维 than %lld which can be safely used in scanf under gcc?

I am aware that %lld does it's job fine; I am just inquisitive :-)


you can use %I64d... but it MS specific...


From C99, "ll (ell-ell) Specifies that a following d, i, o, u, x, or X conversion specifier applies to a long long int or unsigned long long int argument; or that a following n conversion specifier applies to a pointer to a long long int argument." So you can use "%lld" to specify long long datatype.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号