新手求解,请问这是哪里出错了
#include <stdio.h>void main()
{
char i;
int n;
char A[];
A[]="asdf";
printf("%d\n",sizeof i);
printf("%d\n",sizeof n);
printf("%d\n",sizeof A[]);
}
char A[]; A[]="asdf";错误
char A[]="asdf";
printf("%d\n",sizeof i); printf("%d\n",sizeof n); printf("%d\n",sizeof A[]);改为
printf("%d\n",sizeof(i)); printf("%d\n",sizeof(n)); printf("%d\n",sizeof(A));