From 3a8b6e4993beb0ea7714fe841295b24b2b9a4bbf Mon Sep 17 00:00:00 2001 From: ruanyf Date: Mon, 27 Sep 2021 13:51:18 +0800 Subject: [PATCH] docs(types): fix typo --- docs/types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/types.md b/docs/types.md index 34344e4..9b74be8 100644 --- a/docs/types.md +++ b/docs/types.md @@ -599,7 +599,7 @@ if ((-a) < 0) printf("negative\n"); else printf("positive\n"); ``` -上面示例中,变量`a`是 unsigned char 类型,这个类型不可能小于0,但是`-a`会自动转为 int 类型,导致上面的代码输入 negative。 +上面示例中,变量`a`是 unsigned char 类型,这个类型不可能小于0,但是`-a`不是 unsigned char 类型,会自动转为 int 类型,导致上面的代码输出 negative。 再看下面的例子。