Came across this statement in a C book, if ((letter >= 'P') && (letter <= 'S'))
It's trying to check if the letter falls between P and S (including both) and I was quite surprised to see it work.
- How is it possible to do greater-than/lesser-than type operations on alphabets (character data type)?
- It is a feature in only C or in other programming languages as well?
Aucun commentaire:
Enregistrer un commentaire