I am working through the exercises in the book "Learn C the hard way". Exercise 7 asks the reader to find the value which makes the range of an unsigned long exceed.

## what's the point using unsigned int in C?

I thought that unsigned int could store only integers >= 0. But I tried assigning a negative to an unsigned int, nothing special happened. It seems like it stored the value with no problem.

## Why printf (“%d”, ~a); displays -4 when a is equal to 3?

Running the following program display -4 while 252 is expected:Why this code doesn't display 252?I also tested the folowings according to the proposed answer:

## Why printf (“%d”, ~a); display -4 when a is equal to 3?

## Why is the sign different after subtracting unsigned and signed?

Why is the value of c positive but e negative?Let's start by analysing the result of t - d.t is an unsigned int while d is an int, so to do arithmetic on them, the value of d is converted to an unsigned int (C++ rules say unsigned gets preference...

## Why does 'auto' not respect the unary minus operator?

I'm quite new to C++ but I find this behaviour of auto weird:Variable x is unsigned in this case although I used the unary minus operator at the initialiation of the variable. How come that only the return type of sizeof (std::size_t) is considered but not the fact that the...

## Why does 'auto' do not respect the unary minus operator?

I'm quite new to C++ but I find this behaviour of auto weird:Variable x is unsigned in this case although I used the unary minus operator at the initialiation of the variable. How comes that only the return type of sizeof (std::size_t) is considered but not the fact that the...