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

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

问题描述

  1. 由于sizeof是运算符,为什么我们可以像函数调用一样使用sizeof(something);?

  1. Since sizeof is an operator, why can we use sizeof(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.

这篇关于sizeof,当一个字节大于8位时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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