什么是EOF在c中的ASCII值? [英] What is the ascii value of EOF in c.?
本文介绍了什么是EOF在c中的ASCII值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人知道什么是我的ASCII值。
Any one knows what is the ASCII value of i.
我尝试的printf(%d个,EOF);
但其印刷 1
和也尽量的printf(%C,EOF);
但其打印空白屏幕。
所以任何人都知道哪个键 EOF
。
so anyone know which key for EOF
.
推荐答案
EOF
(如C语言定义的)不是一个字符/不是一个ASCII值。这就是为什么 GETC
返回 INT
而不是 unsigned char型
- 因为性格读能有什么价值 unsigned char型
的范围和 GETC
的返回值也需要要能够重新present在非字符值 EOF
(这必然是负面的)。
EOF
(as defined in the C language) is not a character/not an ASCII value. That's why getc
returns an int
and not an unsigned char
- because the character read could have any value in the range of unsigned char
, and the return value of getc
also needs to be able to represent the non-character value EOF
(which is necessarily negative).
这篇关于什么是EOF在c中的ASCII值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文