From 31f56026251864cf3ac2541334556508c133f3fc Mon Sep 17 00:00:00 2001 From: woodrabbit Date: Tue, 25 Jun 2024 21:04:33 +0800 Subject: [PATCH] Fixed a detail in the file openEuler-SEE.md Fixed the output of ch.c. Signed-off-by: woodrabbit --- .../openEuler-SEE/openEuler-SEE.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/playground/openEuler-Exp/openEuler-SEE/openEuler-SEE.md b/playground/openEuler-Exp/openEuler-SEE/openEuler-SEE.md index e31e3ed..59bb0dc 100644 --- a/playground/openEuler-Exp/openEuler-SEE/openEuler-SEE.md +++ b/playground/openEuler-Exp/openEuler-SEE/openEuler-SEE.md @@ -225,12 +225,12 @@ gcc ch.c 以下是在鲲鹏平台上的执行结果: ``` -sizeof ch is 1, 1 +sizeof ch is 1, 1, 1, 1 - char ch = ff, +255, positive + char ch = ffh, +255, positive - signed char ch = ff, -1, negative -unsigned char ch = ff, +255, positive + signed char ch = ffh, -1, negative +unsigned char ch = ffh, +255, positive ``` 可以看出: @@ -242,15 +242,15 @@ unsigned char ch = ff, +255, positive 🤲 *与x64平台比较* -以下是在x64平台上的执行结果: +以下是在x86_64(即x64)平台上的执行结果: ``` -sizeof ch is 1, 1 +sizeof ch is 1, 1, 1, 1 - char ch = ff, -1, negative + char ch = ffh, -1, negative - signed char ch = ff, -1, negative -unsigned char ch = ff, +255, positive + signed char ch = ffh, -1, negative +unsigned char ch = ffh, +255, positive ``` 可见,在x64平台上,`char`的默认数据类型与`signed char`同。 -- Gitee