Exam-style question
Try this first
Which example shows a character code being incorrectly treated as a pure binary number?.
- A.Displaying a stored digit character as text.
- B.Comparing the code for the character '6' with the code for another character.
- C.Adding the character code for '6' directly to a numerical value as if the code itself were the value six.
- D.Storing a numerical value using binary.
Answer and explanation
Concise answer
Adding the character code for '6' directly to a numerical value as if the code itself were the value six.
Why this is correct
A character code identifies the character '6'; it is not automatically the numerical value 6. Treating the code as the value can produce an incorrect result unless a suitable conversion is performed.
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
