Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - C language has int a = 012; And why does printf("%d ",a) output 10? What if int a=025? Pray for the great gods.
C language has int a = 012; And why does printf("%d ",a) output 10? What if int a=025? Pray for the great gods.
Int a=0xxx, which means that A is an octal integer, so 0 12 is octal 12 (i.e.12q); %d is a decimal output, so it is eight to ten.12q =1x 8+2 =10dinta = 025 = 025q = 21d//q means octal, and d means decimal.