+ 3

What is the difference b/w signed and unsigned integer datatype?

9th Apr 2017, 6:55 PM
T Karthikeyan
T Karthikeyan - avatar
3 Respostas
+ 8
signed can be a minus value (- sign) unsigned is positive only
9th Apr 2017, 7:18 PM
Burey
Burey - avatar
+ 7
Think of it like this, it is a data type modifier. Signed means exactly that, the data type is signed (having a negative value (-9 for example), or can have a negative value), where unsigned, again means exactly what it implies (a positive only value (9 for example)). It's an honestly easy concept, just you gotta remember it ^_^
9th Apr 2017, 8:12 PM
SoraKatadzuma
SoraKatadzuma - avatar
+ 6
signed int: from −2.147.483.648 to 2.147.483.647 unsigned int: from 0 to 4.294.967.295
9th Apr 2017, 7:34 PM
Daniel Thomalla
Daniel Thomalla - avatar