EDIT : Now that I am back, let me explain in detail. Since you are typing
It tells the compiler to print the integral value of 97-48, since the ASCII value of a is 97. If you want integer 2, either write
printf("%d",'2'-48);//Note the '2', which tell it is char 2, having ASCII value 50.
printf("%d",a-95);//95 because 97-95=2.
I see many people have doubt about ASCII value. So is there any tutorial on DIC about the same ??
This post has been edited by aresh: 30 May 2012 - 10:52 AM