tangent

Equivalence of -1 and 2^32-1

Oct 9th, 2016
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.17 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdint.h>
  3.  
  4. int main(void)
  5. {
  6.     uint32_t a = (uint32_t)(-1);
  7.     uint32_t b = 4294967295;
  8.    
  9.     printf("%d\n", a - b);
  10.     return 0;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment