sizeof,当一个字节大于8位时?
-
由于
sizeof
是运算符,为什么我们可以像函数调用一样使用sizeof(something);
?
Since
sizeof
is an operator, why can we usesizeof(something);
like a function call?
一个字节什么时候不是8位?
When is a byte not 8 bits?
在这种情况下,字节与无符号字符相同,并且可以大于8位
A byte in this context is the same as an unsigned char, and may be larger than 8 bits
还有可能字节小于8位吗?
And is there a possible that byte is smaller than 8 bits?
由于sizeof是一个运算符,为什么我们可以使用sizof(something);像函数调用一样?
Since sizeof is a operater ,why can we use sizof(something); like a function call ?
好吧,+
也是操作者"(原文如此!),您仍然可以编写(1 + 1)
和(1) + (1)
和((1) + 1)
...这只是普通的括号/分组.
Well, +
is an "operater" (sic!) too, still you can write (1 + 1)
and (1) + (1)
and ((1) + 1)
... it's just normal parenthesizing/grouping.
当字节不是8位吗?
When byte is not 8 bits?
当您使用的平台不是8位时.
When you use a platform on which it isn't 8 bits.
字节是否可能小于8位?
And is there a possible that byte is smaller than 8 bits ?
不在旨在成为符合标准的C实现的体系结构上.不过,这可能会发生.例如,某些早期的打卡机使用6位字节.
Not on an architecture that aims to be a conforming C implementation. It can happen, though. Some of the early punch card machines used 6-bit bytes, for example.