What is the ascii value of EOF in c.?

前端 未结 7 813
隐瞒了意图╮
隐瞒了意图╮ 2020-12-01 13:51

Any one knows what is the ASCII value of i.

I try printf(\"%d\",EOF);

but its print -1

and also try printf(\"%c\",EOF

7条回答
  •  一整个雨季
    2020-12-01 14:41

    The actual value of EOF is system defined and not part of the standard.

    EOF is an int with negative value and if you want to print it you should use the %d format string. Note that this will only tell you its value on your system. You should not care what its value is.

提交回复
热议问题