Bifalgorithm post · Computer science one · Order of Precedence
How are comparison operators used with characters in C?
How are comparison operators used with characters in C? (Computer science one · Order of Precedence) — "16.1.2. Comparing Strings and Characters The comparison…
Ideas in this flowchart
- Comparing strings and characters
- Comparison operators can be used for single characters.
- ASCII assigns each alphanumeric character, symbol, and whitespace character an integer from 0 to 127.
- Character comparisons use the numerical order of their ASCII values.
- The statement ('A' < 'a') is true.
- Uppercase letters precede lowercase letters in the ASCII table.
- 'A' has value 65 and 'a' has value 97, so 65 < 97 is true.
- The comparison operators are listed in Table 16.1.
- The ASCII ordering is shown in Table 2.4.
- Additional comparison examples can be found in the table.