简体   繁体   English

如果超过short int(c ++)的最大值,会发生什么?

[英]What happens if you exceeds the maxium value of short int(c++)?

What value will I get with this code for example, 例如,我将用这段代码获得什么价值,

short int num = 32766
num + 5 = ?

Maxium value for short int is 32767. short int的最大值为32767。

有符号整数溢出是未定义的行为

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM