
Member • Feb 14, 2011
Conversion of char to int
I have been solving a problem post-fix expression evaluation using stacks for lab in the weekend and encountered a problem "conversion of character data to int". I searched through google and found these results "atoi and typecasting".
Both the above conversions are known to me but I came across something different like this
char i='5';
int j = i-'0';
in 'j' the integer value number:5 is stored can anyone please explain how its working