输出是:99100
ASCII码:A-65,a-97
经测试,将int
和char
运算输出是int
,Java、C++都是
盲猜是为了避免运算结果ASCII码非法导致输出?
int i = 2;
int j = i + 'b';
char s = i + 'b';
int f = 'A';
cout << j << " " << s<<" " << f;//100 d 65
cout << endl << 1 + 'b';// 99
标签:输出,运算,int,代码,char,ASCII
From: https://www.cnblogs.com/yaocy/p/16715588.html