# include<stdio.h>
int main(void)
{
int i = 373;
double j = 4.5;
char ch = 'A';
int * p = &i;
double * q = &j;
char * r = &ch;
printf("%d %d %d\n",sizeof(p), sizeof(q), sizeof(r));
return 0;
}
运行结果是 4 4 4
int类型不是2B, double类型不是8B, char不是1B吗?这是怎么回事?求解答!
# include<stdio.h>
int main(void)
{
int i = 373;
double j = 4.5;
char ch = 'A';
int * p = &i;
double * q = &j;
char * r = &ch;
printf("%d %d %d\n",sizeof(p), sizeof(q), sizeof(r));
return 0;
}