Bifalgorithm post · Computer science one · If, If-Else, If-Else-If Statements
What do character comparison results show in C?
What do character comparison results show in C? (Computer science one · If, If-Else, If-Else-If Statements) — "16. Conditionals Comparison Example Result ('A'…
Ideas in this flowchart
- Character comparisons in C can produce unexpected results.
- The code can be written and will compile.
- The code will also run.
- However, the results will not be as expected.
- Table 16.4 presents examples of character comparisons in C.
- 'A' < 'a' is true.
- 'A' == 'a' is false.
- 'A' < 'Z' is true.
- '0' < '9' is true.
- '\n' < 'A' is true.
- ' ' < '\n' is false.