int 溢出会发生什么

judge 难度 2

#variable

int 装不下更大的数时会怎样?

题目

下面代码会输出 2147483648。

int a = 2147483647;
cout << a + 1 << endl;
来小码星球,动手写一遍 →