Hello, I want to know the difference between signed int and unsigned int. Suppose, we write (int x = 5; ) then what type of int it is ?
Signed and Unsigned int
Hey @yashsharma4304
This is signed int
u can declare unsifned int by
unsigned int x=5;
The difference among them is unsigned cant be negative and holds only poisitive nos.
ok so by default we get signed int and for unsigned int we have to declare it. Now, if by default we have signed int then that means it’s first block is reseved for the sign. Does it mean that when we store positive values then also the first block is reserved for positive sign.
Ok thank you for resolving my doubt
1 Like