%@ Object
%d, %i signed int
%u unsigned int
%f float/double
%x, %X hexadecimal int
%o octal int
%zu size_t
%p pointer
%e float/double (in scientific notation)
%g float/double (as %f or %e, depending on value)
%s C string (bytes)
%S C string (unichar)
%.*s Pascal string (requires two arguments, pass pstr[0] as the first, pstr+1 as the second)
%c character
%C unichar
%lld long long
%llu unsigned long long
%Lf long double
本文详细介绍了格式化字符串的使用方法,包括各种类型的变量如何通过特定的格式化代码进行正确输出。涵盖基本的数据类型如整数、浮点数、字符等,并涉及更复杂的格式如科学计数法及字符串的特殊格式化。
3782

被折叠的 条评论
为什么被折叠?



