sizeof的,当一个字节大于8位的? [英] sizeof and when a byte is larger than 8 bits ?
问题描述
-
由于
的sizeof
是算子,为什么我们使用sizof(东西);
像功能打电话? -
在字节不是8位?
这方面的一个字节是相同的为unsigned char,并且可以大于8位
块引用>和是有可能的,字节小于8位?
解决方案
由于sizeof的是一个算子,为什么我们使用sizof(东西);像一个函数调用?
块引用>好吧,
+
是算(原文如此!)也是如此,你仍然可以写(1 + 1)
和(1)+(1)
和((1)+ 1)
...这只是正常圆括号/分组。
在字节不是8位?
块引用>当你使用了一个平台,它不是8位。
和是有可能的,字节小于8位?
块引用>不就一个体系结构,目标是成为一个标准的C实现。它可以发生,但。一些早期的打卡机使用6位字节,例如
Since
sizeof
is a operater ,why can we usesizof(something);
like a function call ?When byte is not 8 bits ?
A byte in this context is the same as an unsigned char, and may be larger than 8 bits
And is there a possible that byte is smaller than 8 bits ?
解决方案Since sizeof is a operater ,why can we use sizof(something); like a function call ?
Well,
+
is an "operater" (sic!) too, still you can write(1 + 1)
and(1) + (1)
and((1) + 1)
... it's just normal parenthesizing/grouping.When byte is not 8 bits?
When you use a platform on which it isn't 8 bits.
And is there a possible that byte is smaller than 8 bits ?
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.
这篇关于sizeof的,当一个字节大于8位的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!