C语言中PRINT("% ,% ",A,B);中%后可以加哪几种数据类型,符号及含义,C语言中PRINT("% ,% ",A,B);中%后可以加哪几种数据类型,符号及含义,

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/03 05:42:50
C语言中PRINT(

C语言中PRINT("% ,% ",A,B);中%后可以加哪几种数据类型,符号及含义,C语言中PRINT("% ,% ",A,B);中%后可以加哪几种数据类型,符号及含义,
C语言中PRINT("% ,% ",A,B);中%后可以加哪几种数据类型,符号及含义,
C语言中PRINT("% ,% ",A,B);中%后可以加哪几种数据类型,符号及含义,

C语言中PRINT("% ,% ",A,B);中%后可以加哪几种数据类型,符号及含义,C语言中PRINT("% ,% ",A,B);中%后可以加哪几种数据类型,符号及含义,
c官方文档有很详细的解释
Output Example
d or i Signed decimal integer 有符号10进制整型 392
u Unsigned decimal integer 无符号10进制整型 7235
o Unsigned octal 无符号8进制整型 610
x Unsigned hexadecimal integer 无符号16 7fa
X Unsigned hexadecimal integer (uppercase) 7FA
f Decimal floating point, lowercase 10进制浮点小数 392.65
F Decimal floating point, uppercase 392.65
e Scientific notation (mantissa/exponent), lowercase 科学计数法 3.9265e+2
E Scientific notation (mantissa/exponent), uppercase 3.9265E+2
g Use the shortest representation: %e or %f 最短表达 392.65
G Use the shortest representation: %E or %F 392.65
a Hexadecimal floating point, lowercase 16进制浮点小数 -0xc.90fep-2
A Hexadecimal floating point, uppercase -0XC.90FEP-2
c Character 字符 a
s String of characters 字符串 sample
p Pointer address 指针地址 b8000000
n Nothing printed.
The corresponding argument must be a pointer to a signed int.
The number of characters written so far is stored in the pointed location.
% A % followed by another % character will write a single % to the stream. %