C语言中PRINT("% ,% ",A,B);中%后可以加哪几种数据类型,符号及含义,C语言中PRINT("% ,% ",A,B);中%后可以加哪几种数据类型,符号及含义,
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/11 02:40:45
![C语言中PRINT(](/uploads/image/z/14042924-44-4.jpg?t=C%E8%AF%AD%E8%A8%80%E4%B8%ADPRINT%28%22%25+%2C%25+%22%2CA%2CB%29%EF%BC%9B%E4%B8%AD%25%E5%90%8E%E5%8F%AF%E4%BB%A5%E5%8A%A0%E5%93%AA%E5%87%A0%E7%A7%8D%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%2C%E7%AC%A6%E5%8F%B7%E5%8F%8A%E5%90%AB%E4%B9%89%2CC%E8%AF%AD%E8%A8%80%E4%B8%ADPRINT%28%22%25+%2C%25+%22%2CA%2CB%29%EF%BC%9B%E4%B8%AD%25%E5%90%8E%E5%8F%AF%E4%BB%A5%E5%8A%A0%E5%93%AA%E5%87%A0%E7%A7%8D%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%2C%E7%AC%A6%E5%8F%B7%E5%8F%8A%E5%90%AB%E4%B9%89%2C)
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. %