标签:语言 include 基础 代码 运行 clu c语言基础 turn 结果
如下的资料是关于C语言基础:将整数格式化成其它进制输出的代码。#include <stdio.h>
int main ()
{
int value = 255;
printf("The decimal value %d in octal is %on",
value, value);
printf("The decimal value %d in hexadecimal is %xn",
value, value);
printf("The decimal value %d in hexadecimal is %Xn",
value, value);
return 1;
}
gcc编译运行结果
The decimal value 255 in octal is 377
The decimal value 255 in hexadecimal is ff
The decimal value 255 in hexadecimal is FF
标签:语言 include 基础 代码 运行 clu c语言基础 turn 结果
原文地址:http://blog.51cto.com/14118518/2345736