Is 0 an octal or a decimal in C? [duplicate]

It makes little difference, but formally the integer constant 0 is octal in C. From the C99 and C11 standards, 6.4.4.1 Integer constants

integer-constant:
    decimal-constant integer-suffixopt
    octal-constant integer-suffixopt
    hexadecimal-constant integer-suffixopt

decimal-constant:
    nonzero-digit
    decimal-constant digit

octal-constant:
    0
    octal-constant octal-digit

hexadecimal-constant:
    …
    …

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)