#include<stdio.h>
int b[100];
void fun(int b[100])
{
sizeof(b);
printf("%d\n",sizeof(b)); //4
}
int main()
{int a[100];
int *p =NULL;
printf("%d\n",sizeof(*p)); //4
printf("%d\n",sizeof(a[100])); //4
printf("%d\n",sizeof(&a)); //400
printf("%d\n",sizeof(&a[0])); //4
printf("%d\n",sizeof(a)); //400
fun(a);
while(1);
return 0;
}
C深度剖析,指针大小,迷惑死你
最新推荐文章于 2022-02-25 22:41:09 发布