Just learned that ‘char’s in C are small integers! This means that ‘char’ variables and constants are identical to ‘int’s in arithmetic expressions.,
Till recently, I thought if x had to store a value ‘a’, then x had to be of the type ‘char’. Now that is pretty much false. If x should check for EOF values, x should be of type ‘int’ as ‘char’ type will not be able to store EOF in addition to any ‘char’.
Programming as an art, is mastered only by a very few!
Reference: C Programming Language, Brian W. Kernigham & Dennis M. Ritchie