r/C_Programming • u/Low_Minimum9920 • Jun 15 '26
Question Question regarding unsigned integers
What's the difference between an unsigned int and a normal integer?
11
Upvotes
r/C_Programming • u/Low_Minimum9920 • Jun 15 '26
What's the difference between an unsigned int and a normal integer?
View all comments
Show parent comment
5
u/pjl1967 Jun 15 '26
Strictly speaking (i.e., in math), 0 is neither positive nor negative. In twos complement, it's de facto positive; in (rare) ones complement, there is actually positive and negative 0.