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
EOF is not an ASCII character. Its size is not 1 byte as against size of a character and this can be checked by
int main() {
printf("%lu", sizeof(EOF));
return 0;
}
However, it is always defined to be -1. Try
int main() {
printf("%d",EOF);
return 0;
}
The key combination for EOF is Crtl+D. The character equivalent of EOF is machine dependent. That can be checked by following:
int main() {
printf("%c", EOF)
return 0;
}