在阅读 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
应该至少足够大以容纳值 -32767
到 32767
, 但它可能更大。
在现实世界中,16 位计算机使用 -32768
到 32767
因为它们使用 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/