#include<stdio.h> int main() { //默认情况下是十进制 int number = 12; // 二进制(0b或者0B开头) int number2 = 0b1100; //八进制(0开头) int number8 = 014; //十六进制(0x或者0X开头) int number16 = 12; printf("%d ", number); printf("%d ", number2); printf("%d ", number8); printf("%d ", number16); return 0; }
12 12 12 12