"Numeric constants are considered octal if preceded by zero, and are considered hexadecimal if they are preceded by zero and and x (0x)." (as explained here )
008 is not considered octal because it contains "8", which is not an octal number. 0010 is actually an octal number and equal to 8.
source share