开发者

Opposite of putchar()?

开发者 https://www.devze.com 2022-12-16 09:30 出处:网络
Is there an opposite to putchar() where you can pass the ascii character and it will output the numerical valu开发者_如何学编程e?Thanks.printf(\"%d\\n\", c);I am not sure which language you are talkin

Is there an opposite to putchar() where you can pass the ascii character and it will output the numerical valu开发者_如何学编程e? Thanks.


printf("%d\n", c);


I am not sure which language you are talking. In 'C++', you could just pass (int) ch which should return the numeraical ascii value.

0

精彩评论

暂无评论...
验证码 换一张
取 消