Is the “(int)” in “sizeof (int)” a typecast operator or some special case parameter? [C]
本问题已经有最佳答案,请猛点这里访问。
我一直认为C表达式
但是我最近发现,如果在变量上使用
如果操作数是数据类型,则
C11:6.5.3.4(p2):
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.