c语言答案为什么是1CDE,为什么sizeof(“”)等于1而sizeof(NULL)相当于c语言中的4?...

0

"" --> Cstrings are terminated by convention with a x'00' null character so literal "" consists of one character x'00' and has sie of 1 byte.

“” - > Cstrings通过约定终止,带有x'00'空字符,因此字面“”由一个字符x'00'组成,并且具有1个字节的sie。

NULL is by default a null pointer which on particular 32 bit machines has a size of four bytes on different platforms it could br 1,2,3,4,6 or 8. Maybe even 5 or 7 but I have never come accross a 40 bit or 56 bit addressing. Also in some older architectures there may be extra bits associated with a pointer to indicate data vs. instruction vs. device buffer storage etc.

默认情况下,NULL是一个空指针,在特定的32位机器上,在不同平台上的大小为4个字节,它可以是1,2,3,4,6或8.甚至可能是5或7但我从来没有遇到过40位或56位寻址。此外,在一些较旧的体系结构中,可能存在与指针相关联的额外位,以指示数据与指令与设备缓冲存储等。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值