-1

What value will I get with this code for example,

short int num = 32766
num + 5 = ?

Maxium value for short int is 32767.

1 Answers1

4

Signed integer overflow is undefined behavior.

AMA
  • 4,114
  • 18
  • 32