When a =010 cout of a is 8 instead of 10,
Same when a=0100 cout of a is 64 instead of 100 why?
Well, this is strange but here is my observation.
I realized that every occurrence of 0 before a number led to some return of a bit amount.
I think this means that the number is no longer being seen as a number but rather a byte representation.
The compiler thinks you are calling for some bit amount.
Like 01 = 1 bit, 02 = 2 bit, 010 = 8 bit, 020= 16 bit, 021 = 17 bit, 0100= 64 bit and so on.
This might not be the explanation but it is just my observation.