gpt4 book ai didi

c - unsigned short int 和 unsigned short 之间的区别

转载 作者:太空狗 更新时间:2023-10-29 17:06:20 31 4
gpt4 key购买 nike

unsigned short int 和 c 中的 unsigned short decleration 之间有区别吗?如果有,那是什么?我尝试在网上查找,但找不到任何有值(value)的东西。

unsigned short int x1;
unsigned short x2;

最后,如果有不同,请问我如何将它们分别转换为彼此?

最佳答案

来自 C11 [PDF] (省略无关部分)(强调我的):

6.7.2.2:

At least one type specifier shall be given in the declaration specifiers in each declaration, and in the specifier-qualifier list in each struct declaration and type name. Each list of type specifiers shall be one of the following multisets (delimited by commas, when there is more than one multiset per item); the type specifiers may occur in any order, possibly intermixed with the other declaration specifiers.

  • ...
  • short, signed short, short int, or signed short int
  • unsigned short, or unsigned short int
  • ...

6.7.2.5:

Each of the comma-separated multisets designates the same type ...

关于c - unsigned short int 和 unsigned short 之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16283436/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com