EOF的价值 [英] Value of EOF

查看:51
本文介绍了EOF的价值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,这让我感到困惑。这就是它所说的:


练习1-7。编写一个程序来打印EOF的值。


这是书中的The C Programming Language。关于编写该程序,我怎么去

,老实说,我不明白这意味着什么,

请帮忙。谢谢。

Alright, this is puzzling me. Here''s what it says:

Exercise 1-7. Write a program to print the value of EOF.

Which is from the book "The C Programming Language". How would I go
about writing that program, I honestly don''t understand what it means,
please help. Thanks.

推荐答案



Matt写道:

Matt wrote:
好吧,这是让我困惑。这就是它所说的:

练习1-7。编写一个程序来打印EOF的值。

哪个来自书中的The C Programming Language。我怎么去写这个程序呢?老实说,我不明白它是什么意思,请帮忙。谢谢。
Alright, this is puzzling me. Here''s what it says:

Exercise 1-7. Write a program to print the value of EOF.

Which is from the book "The C Programming Language". How would I go
about writing that program, I honestly don''t understand what it means, please help. Thanks.




EOF只是一个整数。



EOF is simply an integer.


0或1?如果是这样的话,我只是不知道该怎么做......这会是什么样的?这是什么?:


#include< stdio。 h>


main()

{

int val1,val2;


val1 = 1;

val2 = 0;


printf(EOF等于:%d%d \ n,val2, val1);

}


?我不确定......

0 or 1? If so, I just don''t get how to do that...would it be like
this?:

#include <stdio.h>

main()
{
int val1, val2;

val1 = 1;
val2 = 0;

printf("EOF is equal to either: %d %d\n", val2, val1);
}

? I''m not sure...


文章< 11 ***************** *****@f14g2000cwb.googlegroups .com> ;,
没有****** @ gmail.com 说...
In article <11**********************@f14g2000cwb.googlegroups .com>,
no******@gmail.com says...
0或1?如果是这样的话,我就是不知道怎么做......这会是什么感觉?

#include< stdio.h>

main()
{
int val1,val2;

val1 = 1;
val2 = 0;

printf(" ; EOF等于:%d%d \ n,val2,val1);
}

?我不确定...
0 or 1? If so, I just don''t get how to do that...would it be like
this?:

#include <stdio.h>

main()
{
int val1, val2;

val1 = 1;
val2 = 0;

printf("EOF is equal to either: %d %d\n", val2, val1);
}

? I''m not sure...




你一定是在开玩笑。请说你在开玩笑。


-

兰迪霍华德(2个人删除FOOBAR)

让它变得困难做愚蠢的事情往往会让你很难做到聪明的事情。 - Andrew Koenig



You''ve got to be kidding. Please say you''re joking.

--
Randy Howard (2reply remove FOOBAR)
"Making it hard to do stupid things often makes it hard
to do smart ones too." -- Andrew Koenig


这篇关于EOF的价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆