C语言中的Sizeof

1.C11标准中的sizeof  Constraints  1  Thesizeofoperator shall not be applied to an expression that has function type or an incomplete type, to the parenthesized name of such a type, or to an expression that designates a bit-field member. The_Alignofope...
摘要由CSDN通过智能技术生成

1.C11标准中的sizeof

   Constraints

  1  The sizeof operator shall not be applied to an expression that has function type or an incomplete type, to the parenthesized name of such a type, or to an expression that designates a bit-field member. The _Alignof operator shall not be applied to a function type or an incomplete type.

  sizeof不应该用在函数类型、不完整类型、前面两种带上括号、位域成员类型
  Semantics
  2  The sizeof operator yields the size (in bytes) of its operand, which may be an expression or the parenthesized name of a type. The size is determined from the type of the operand. The result is an integer. If the type of the operand is a variable length array type, the operand is evaluated; otherwise, the operand is not evaluated and the result is an integer constant.

  sizeof的操作数可能是一个表达式或者带上括号的表达式,size由操作数的类型决定。如果操作数是一个可变长度的数组,则size是一个估计的数。

  3  The _Alignof operator yields the alignment requirement of its operand type. The ope

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值