#include
int main(void)
{
printf("hello world\r");//输出hello world光标定位在h前,因为\r转义字符。
//printf("bob\n");//将覆盖为boblo world
#if 1
fflush(stdout);//因为printf为行缓冲,如果无此句或\n,将显示结果为无输出!
while(1);
#endif
return 0;
int a = 5;
char ch = 'G';
float f = 4.13;
printf("a = %d\tch = %c\tf = %f\n", a, ch, f);
printf("a = %d ch = %c f = %f\n", a, ch, f);
printf("%x\n", 20);
printf("%o\n", 20);
printf("a = %d\n", a);
printf("ch = %c\n", ch);
printf("f = %f\n", f);
printf("hello world!\n");
return 0;
}
//下面的输出结果为
a = 5 woch = G f = 4.130000
a = 5 ch = G f = 4.130000
14
24
a = 5
ch = G
f = 4.130000
hello world!
阅读(326) | 评论(0) | 转发(0) |