I am trying to understand why the following statement works:

putchar( 1 + '0' );

It seems that the + '0' expression converts the literal to the respective ASCII version (49 in this particular case) that putchar likes to be given.

My question was why does it do this? Any help is appreciated. I also apologize if I have made any incorrect assumptions.

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top