r/C_Programming • • Jun 15 '26

Question Question regarding unsigned integers

What's the difference between an unsigned int and a normal integer?

11 Upvotes

93 comments sorted by

View all comments

Show parent comment

2

u/Low_Minimum9920 Jun 16 '26

I really appreicate the answer! I wasn't quite sure if the word "signed" int was quite correct therefore I just chose to say normal xD

1

u/CarlRJ Jun 16 '26

If you want to be a bit more surprised, all three of these declarations do the same thing (other than having different variable names):

int foo1;
signed int foo2;
signed foo3;