C - Data Type Octal Constants


An octal value is a number to base 8.

Each octal digit has a value from 0 to 7, which corresponds to three bits in binary.

An integer constant that starts with a zero, such as 014, will be interpreted as an octal number.

014 is the octal equivalent of the decimal value 12.


#include <stdio.h>

int main(void)

    printf("%d.", -14);
    return 0;//  w ww.ja v  a2s . c  o  m