ch should be declared as int - otherwise you could not distinguish EOF from the character with the code 0xFFwhile((ch = getchar()) != EOF)
ch should be declared as int - otherwise you could not distinguish EOF from the character with the code 0xFFwhile((ch = getchar()) != EOF)
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler