int is 4 bytes but still it can be stored in char why is there no overflow

Viewed 1563

Check out this program

#include<stdio.h>

int main (){

char c='a';
printf("%d %d", sizeof(c),sizeof('a'));
}

the output is 1 4
I know when we write a statement char c='a';

then how does it happen that in space of 1 byte (char c) some thing of 4 bytes (ASCII code) is stored why is there no overflow etc.

3 Answers
Related