C语言打印八进制和十六机制格式 C语言打印int值 C语言整数溢出 C语言打印八进制和十六机制格式 /* bases.c--prints 100 in decimal, octal, and hex */ #include <stdio.h> int main(void) { int x = 100; printf("dec = %d; octal = %o; hex = %x\n", x, x, x); printf("dec = %d; octal = %#o; hex = %#x\n", x, x, x); return 0; } C语言打印int值 C语言整数溢出