Query Regarding Character Operations..

Posted by RBA on Stack Overflow See other posts from Stack Overflow or by RBA
Published on 2010-05-10T07:15:24Z Indexed on 2010/05/10 7:24 UTC
Read the original article Hit count: 232

Filed under:
|

Hi,

Please explain the following piece of code..

   printf("%c\n",0+'0'); --> returns 0
   printf("%c\n",1+'0'); --> returns 1
   printf("%c\n",0+'1'); --> returns 1
   printf("%c\n",1+'1'); --> returns 2

Thanx.

© Stack Overflow or respective owner

Related posts about c

    Related posts about character