가능한 중복 : 여기
Why are C character literals ints instead of chars?sizeof ('a')가 C에서 4 인 이유는 무엇입니까?
#include<stdio.h>
int main(void)
{
char b = 'c';
printf("here size is %zu\n",sizeof('a'));
printf("here size is %zu",sizeof(b));
}
가 출력 (라이브 데모 here를 참조하십시오.)되어
here size is 4
here size is 1
sizeof('a')
이 4 왜 점점 아니에요?
페이지에 해당 [대신 문자의 C 문자 리터럴의 int를 왜?] (http://stackoverflow.com/questions/433895/why-are-c- 문자 - 리터럴 - 문자 대신 - ints) –