So, now we will try to understand, what these all data- types do and how do they declare and work.
Syntax: char variable_name;
example : char ch; <==== This is Declaration.
char ch = ‘a’; <====This is Initialization.
When we declare character data – type compiler allocates 1byte (=8bits).
So internally, it stores as an ASCII (American Standard Code for Information Interchange) value.
Example: If you initializ character data as ‘A’ it will consider ASCII value as 65.
lly, for ‘a’ ====> 97
and ‘0’ ====> 48 (zero)
C language supports only ASCII code.
Example : ch = ‘a’ <=== 97 in ASCII