From 2e78526cca06145d6499a9793c936613301a7d09 Mon Sep 17 00:00:00 2001 From: "rick.chan" Date: Thu, 6 Jul 2023 15:07:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=A4=BA=E4=BE=8B.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: rick.chan --- .../C_Standard_Library/C_标准输入输出及格式化说明.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Software/Development/Library/C_Standard_Library/C_标准输入输出及格式化说明.md b/Software/Development/Library/C_Standard_Library/C_标准输入输出及格式化说明.md index c46d442..fded66a 100644 --- a/Software/Development/Library/C_Standard_Library/C_标准输入输出及格式化说明.md +++ b/Software/Development/Library/C_Standard_Library/C_标准输入输出及格式化说明.md @@ -72,3 +72,13 @@ | \r | 回车 | | \t | 水平制表符 | | \v | 垂直制表符 | + +## 示例 + +```cpp +int a=0x10A; +printf("%x.\n", a); // print 10a. +printf("%#x.\n", a); // print 0x10a. +printf("%X.\n", a); // print 10A +printf("%#X.\n", a); // print 0X10A +```