Q:

What is the ascii value of EOF in c.?

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);
but its print blank screen.
so anyone know which key for EOF.

A:

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).

A:

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.

