小编Muj*_*lam的帖子

ASCII 值大于 127

#include <stdio.h> 
  
int main() { 
    char c = 125; 
  
    c = c + 10; 
  
    printf("%d", c); 
  
    return 0; 
}
Run Code Online (Sandbox Code Playgroud)

这段代码的输出是-121

这个输出如何-121?你能解释一下吗?

如果我添加100而不是10withc那么输出是-31. 为什么?

c ascii char

1
推荐指数
1
解决办法
191
查看次数

标签 统计

ascii ×1

c ×1

char ×1