//a.c
#include<stdio.h>
int main()
{
printf("%d \n",sizeof'A'); //the result is 4
return 0;
}
why the result of sizeof'A' is 4 in c? I run it in windows 7 X64,vs2010.
//a.cpp
#include<stdio.h>
int main()
{
printf("%d \n",sizeof'A'); //the result is 1
return 0;
}
in a .cpp file the rusult is 1.why?