# What is the reason for this contradiction about the size of the char type?

the size of one char in C is 4 bytes, however to define an 'A' character we use the sum of two values like this expression here:

$2^{7}*0 + 2^{6}*1 + 2^{5}*0 + 2^{4}*0 + 2^{3}*0 + 2^{2}*0 + 2^{1}*0 + 2^{0}*1 = 64 + 1 = 65 = 'A.'$

or in other way i want to say that the char is 4 bytes size, but in the example it shows that the size is 8 bytes.

how it happens, what is wrong here ?

• Size of char in C is 1 byte or 8 bits. Aug 24 '21 at 20:12
• You can check the size of character data type in C using sizeof(char) which shall return the size of a data type in bytes. You shall get the answer as 1. The polynomial which you have written is nothing but the decimal conversion of the 8 bit binary number 01000001 which 65 in decimal and this happens to be the ASCII code of the character A Aug 24 '21 at 20:17
• ASCII is a standard code for character representation, where the least significant 7 bits are used to represent character. giving a total of 128 characters while the most significant bit is used for parity... Aug 24 '21 at 20:19
• @AbhishekGhosh Size of char in C is at least 8 bits. Aug 25 '21 at 5:36
• With emphasis on at least which means it can be more. Like 12, 16 or 32. Aug 25 '21 at 6:24