sizeof的,当一个字节大于8位的? [英] sizeof and when a byte is larger than 8 bits ?

查看:151
本文介绍了sizeof的,当一个字节大于8位的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 由于的sizeof 是算子,为什么我们使用 sizof(东西); 像功能打电话?


  2. 在字节不是8位?



  

这方面的一个字节是相同的为unsigned char,并且可以大于8位


和是有可能的,字节小于8位?


解决方案

  

由于sizeof的是一个算子,为什么我们使用sizof(东西);像一个函数调用?


好吧, + 是算(原文如此!)也是如此,你仍然可以写(1 + 1)(1)+(1)((1)+ 1) ...这只是正常圆括号/分组。


  

在字节不是8位?


当你使用了一个平台,它不是8位。


  

和是有可能的,字节小于8位?


不就一个体系结构,目标是成为一个标准的C实现。它可以发生,但。一些早期的打卡机使用6位字节,例如

  1. Since sizeof is a operater ,why can we use sizof(something); like a function call ?

  2. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆