Because sizeof(int) is unsigned. So -1 is converted to a large unsigned value.
More Related Contents:
- sizeof works unusual at c++ after array creation [duplicate]
- Why is the result of sizeof implementation defined? [closed]
- Why isn’t sizeof for a struct equal to the sum of sizeof of each member?
- When a function has a specific-size array parameter, why is it replaced with a pointer?
- Why are C character literals ints instead of chars?
- Is the sizeof(some pointer) always equal to four?
- Is sizeof(bool) defined in the C++ language standard?
- What is the size of a pointer?
- Sizeof string literal
- sizeof a union in C/C++
- Why is the size of an empty class in C++ not zero? [duplicate]
- Is sizeof in C++ evaluated at compilation time or run time?
- How do sizeof(arr) / sizeof(arr[0]) work?
- sizeof() a vector
- Can sizeof return 0 (zero)
- Is the size of a struct required to be an exact multiple of the alignment of that struct?
- Why the sizeof(bool) is not defined to be one, by the Standard itself?
- 3-byte int and 5-byte long?
- sizeof class with int , function, virtual function in C++?
- What does sizeof do?
- Using sizeof on arrays passed as parameters [duplicate]
- Why is −1 > sizeof(int)?
- c++ sizeof(array) return twice the array’s declared length
- sizeof(struct) returns unexpected value
- Can you resize a C++ array after initialization? [duplicate]
- Why sizeof int is wrong, while sizeof(int) is right?
- what is the size of an enum type data in C++?
- c++ sizeof() of a class with functions
- How does sizeof know the size of the operand array?
- how to determine sizeof class with virtual functions?