sizeof array clarification

后端 未结 6 2250
不知归路
不知归路 2020-12-06 18:34

I am studying for a final tomorrow in C, and have a question regarding the sizeof operator.

Let\'s say the size of an int is 32 bits and a

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-06 19:01

    The size of zip is known at compile time and the size of zap is not. That is why you are getting the size of a pointer on sizeof(zap) and the size of the array on sizeof(zip).

提交回复
热议问题