I have the following code:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char * argv[]){
printf("size of tab = %d\n", sizeof('\t'));
printf("size of a = %d\n", sizeof('a'));
printf("size of char = %d\n", sizeof(char));
}
Output:
size of tab = 4
size of a = 4
size of char = 1
Why is the size of 'a'
and the size of char
different. Isn't 'a'
a char
?