Блог пользователя avik26091998

Автор avik26091998, история, 9 лет назад, По-английски

Why do unsigned integers wrap without extensively using the modulo operator in c++?? Suppose , Unsigned int a , b; a and b both are 2^32-1. Then what will be the value of a+b?

so if they don't overflow how can we make them overflow??

  • Проголосовать: нравится
  • -11
  • Проголосовать: не нравится

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

why not run it yourself to find out? this seems to be easily tested out right?