输出0怎么样? [英] How is output 0?
本文介绍了输出0怎么样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
#include< stdio.h>
#include< math.h>
#include< conio.h>
void main()
{
printf("%d",(36.0));
getch();
}
如何输出0
#include<stdio.h>
#include<math.h>
#include<conio.h>
void main()
{
printf("%d",(36.0));
getch();
}
how output is 0
推荐答案
不,它不输出''0'',见下文:
no, it does not output ''0'', see below:
展开 | 选择 | Wrap | 行号
%d" printf 的参数告诉它将下一个参数解码为 int 。但是,您传递了双。毫不奇怪输出是乱码。
The "%d" argument to printf tells it to decode the next argument as an int. However, you passed a double. It should come as no surprise that the output is garbled.
@Luuk
任何想法,为什么输出会变化?是否需要前两个字节
并打印?
@Luuk
Any idea, why is the output varying? Should it take
first 4 bytes and print?
这篇关于输出0怎么样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文