我不知道两者之间有什么区别。有人可以澄清一下吗
unsigned short int是无符号的短整数,但大小取决于实现。该标准仅表示至少为16位(即UINT_MAX的最小值为65535)。在实践中通常是16位,但是你不能保证这样做。
注意:
>如果要使用便携式无符号16位整数,请使用uint16_t。
> inttypes.h和stdint.h都在C99中引入。如果您使用C89,请定义自己的类型。
> uint16_t可能不会在某些实现中提供(参见下文),但是unsigned short int始终可用。
参考:C11(ISO / IEC 9899:201x)§7.20整数类型
For each type described herein that the implementation provides) shall declare that typedef name and define the associated macros. Conversely,for each type described herein that the implementation does not provide,shall not declare that typedef name nor shall it define the associated macros. An implementation shall provide those types described as ‘‘required’’,but need not provide any of the others (described as ‘optional’’).
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。