When you lie to printf, what do you expect?
You told printf to print the value of a using %d as the format specification. Go to your library reference and learn what type of value %d requires. Did you provide a value of that type? Obviously not.
printf printed the correct value for b. Go to your language reference and learn what happens when you assign a value that is out of range to an unsigned integer.
You are asking a lot of questions about why C does not do what you expect. It is time to realize that many of your expectations are not based on what the standard requires the language to do.