c - "The C standards set lower bounds on the numeric ranges of the different data types, but there are no upper bounds"?

标签 c types architecture system limit

在阅读 Randal E. Bryant 和 David R. O'Hallaron 的教科书计算机系统时,我遇到了一个问题:

The C standards set lower bounds on the numeric ranges of the different data types, but there are no upper bounds.

这是什么意思?

最佳答案

这意味着 C 标准例如说 int 应该至少足够大以容纳值 -3276732767 , 但它可能更大。

在现实世界中,16 位计算机使用 -3276832767 因为它们使用 2 的补码。而 32 位计算机使用 -2.14 到 +21.4 亿。

关于c - "The C standards set lower bounds on the numeric ranges of the different data types, but there are no upper bounds"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52890892/

相关文章:

haskell - 通用量化和统一,一个例子

c# - 延迟加载 - 什么是最好的方法?

architecture - 您如何在 Udi 风格的 SOA 架构中聚合数据?

c# - 获取特定类型的对象

java - 如何构建可扩展的多应用程序并能够扩展某些应用程序组件?

无法释放分配的一维和二维数组的内存

c - C语言中的二进制计数器

c - 一维数组乘法

c - C 中日历作业的问题

types - 哪些语言将符号/无符号属性归因于操作而不是数据?