输出意外 [英] output unexpected
问题描述
我写了
void main()
{
int j;
j - = 0;
printf("%d",y);
}
&我得到了答案为842.我在各种计算机上尝试过,但
答案是一样的。请帮助我
这个答案是怎么回事?
i write
void main()
{
int j;
j - = 0;
printf("%d",y);
}
& i got the answer as 842. i tried it on various computers but the
answer is same. pls help me
how is this answer is?
推荐答案
< Va ******* @ gmail.comha scritto nel messaggio
新闻:11 ********************** @ p79g2000cwp.googlegr oups.com ...
<Va*******@gmail.comha scritto nel messaggio
news:11**********************@p79g2000cwp.googlegr oups.com...
i write
void main()
i write
void main()
int main(无效)
int main(void)
{
int j;
j - = 0;
printf("%d",y);
{
int j;
j - = 0;
printf("%d",y);
y
printf("%d \ nn",j);
>
j必须初始化!
y ?
printf("%d\n",j);
j must be initialized!
}
&我得到了答案为842.我在各种计算机上尝试过,但
答案是一样的。请帮助我
这个答案是怎么回事?
}
& i got the answer as 842. i tried it on various computers but the
answer is same. pls help me
how is this answer is?
-
Giorgio Silvestri
DSP /嵌入式/实时操作系统软件工程师
--
Giorgio Silvestri
DSP/Embedded/Real Time OS Software Engineer
" Giorgio Silvestri" < gi ************** @ libero.itha scritto nel messaggio
新闻:HJ *************** *******@twister1.libero.it ..
"Giorgio Silvestri" <gi**************@libero.itha scritto nel messaggio
news:HJ**********************@twister1.libero.it.. .
>
< Va ******* @ gmail.comha scritto nel messaggio
新闻:11 ********************** @ p79g2000cwp.googlegr oups.com ...
>
<Va*******@gmail.comha scritto nel messaggio
news:11**********************@p79g2000cwp.googlegr oups.com...
i write
void main()
i write
void main()
int main(void)
int main(void)
{
int j;
j - = 0;
printf("%d",y);
{
int j;
j - = 0;
printf("%d",y);
y
printf("%d \ n",j);
>
j必须初始化!
y ?
printf("%d\n",j);
j must be initialized!
和
返回0;
and
return 0;
}
&我得到了答案为842.我在各种计算机上尝试过,但
答案是一样的。请帮助我
这个答案是怎么回事?
}
& i got the answer as 842. i tried it on various computers but the
answer is same. pls help me
how is this answer is?
-
Giorgio Silvestri
DSP /嵌入式/实时OS软件工程师
--
Giorgio Silvestri
DSP/Embedded/Real Time OS Software Engineer
Va ** *****@gmail.com 写道:
i write
void main()
{
int j;
i write
void main()
{
int j;
j'的值未定义。
j''s value is undefined.
j - = 0;
printf("%d",y);
j - = 0;
printf("%d",y);
y完全未申报。这甚至不应该按照书面编译。
y is entirely undeclared. This should not even compile as written.
这篇关于输出意外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!