I checked the value of EOF and found that its value is -1.In dennis ritchie it is given that we need to take a variable which should be big enough to hold EOF value.... thats because he has taken that variable as integer type.... but why do we need integer type to store -1... why cant we declare that variable as char type??