再来求助

P1055 [NOIP2008 普及组] ISBN 号码

iqiqiqiqiqiqiqiq @ 2022-11-29 16:47:55

将int类型赋值到char上会按ASCALL码算吗? 比如下面这样(免去定义)

i=48
c[1]=i;

行吗?


by ISTP @ 2022-11-29 16:50:47

@iqiqiqiqiqiqiqiq 是的,会输出字符 '0'


by iqiqiqiqiqiqiqiq @ 2022-11-29 16:51:24

谢谢


by Katz @ 2022-11-29 16:56:25

@iqiqiqiqiqiqiqiq 其实,你可以先自己试试


by iqiqiqiqiqiqiqiq @ 2022-11-29 16:57:27

再问一下,mod是和%一样的吗?


by 02Ljh @ 2022-11-29 16:58:46

@iqiqiqiqiqiqiqiq 是的捏


by KS_tips_CN @ 2022-11-29 17:09:32

@iqiqiqiqiqiqiqiq 意义是一样的


by AAA404 @ 2022-11-29 17:22:57

@iqiqiqiqiqiqiqiq 但你如果在代码里写mod...


|