#define S "12345"
sizeof(S) = 6
strlen(S) = 5
char *p ="12345";
sizeof(p) = 4
strlen(p) = 5
char a[40]="12345";
sizeof(a) = 40
strlen(a) = 5
char b[] ="12345";
sizeof(b) = 6
strlen(b) = 5
sizeof返回变量或结构所占内存数
以字节为单位
#define S "12345"
sizeof(S) = 6
strlen(S) = 5
char *p ="12345";
sizeof(p) = 4
strlen(p) = 5
char a[40]="12345";
sizeof(a) = 40
strlen(a) = 5
char b[] ="12345";
sizeof(b) = 6
strlen(b) = 5
sizeof返回变量或结构所占内存数
以字节为单位