What is value of EOF and '\0' in C
问题 I know that EOF and '\0' are of type integers, but if so shouldn't they have a fixed value? I printed both and got -1 for EOF and 0 for '\0' . But are these values fixed? I also had this int a=-1; printf("%d",a==EOF); //printed 1 Are the value for EOF and '\0' fixed integers? 回答1: EOF is a macro which expands to an integer constant expression with type int and an implementation dependent negative value but is very commonly -1. '\0' is a char with value 0 in C++ and an int with the value 0 in