本文介绍了将2个字符分配给int的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想了解此代码的结果:
I am trying to understand the outcome of this code:
The result is 25700. How the compiler get this number?Thanks
推荐答案
'd'的ascii代码是0x64。 'dd'由编译器表示为0x6464,用十进制表示法时为25700.
The ascii code for 'd' is 0x64. The literal 'dd' was represented as 0x6464 by your compiler, which is 25700 when written in decimal notation.
这篇关于将2个字符分配给int的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!