+ 1
What is the difference between signed and unsigned int?
3 Respostas
+ 6
They are both 32bits.
But unsigned variable can store a value two times larger then signed variable.
In signed integer, only 31 bits are used to the value itself. One bit terminates if the value is - or +. So all together its 32 bits.
With unsigned integer, all 32 bits are used to the value. And therefore we can't have negative numbers but we can have two times larger positive value
signed integer = -2,147,483,648 to 2,147,483,647
unsigned integer = 0 to 4,294,967,295
0
Topper will know😉Ramyashri
0
🙄🙄🙄