Objectives :
- myCharType1 :
myCharType1B.txt
- Numerical operations of Characters
- In C/C++ ,the char data-type is converted to its numerical
codes , and allows mathematical operations.
char ch1 = 'A'; // ASCII A= 65
int n2, n3 ;
n2 = ch1 + 2; // n2 = 65 + 2 = C (ASCII value )
- character conversion specifier %c
%c will convert 69 to Character E
- decimal conversion specifier %d
%d will specify an integer
|