ABSTRACT

Since a character in the ASCII set is represented by an integer between 0 and 255, we can use the char type to store its value. When a character is stored into a variable, it is the character’s ASCII value that is actually stored. In the following example,

char ch; ch = 'c';

the value of ch becomes equal to the ASCII value of the character c. Therefore, the statement ch = 'c'; is equivalent to ch = 99.