First page Back Continue Last page Overview Graphics
Character and String Constants
A string consists of a sequence of printable characters between either single or double quotes. Typically strings are used for messages to the user.
- ‘This is a string’
- “This is a string as well”
The ASCII values for the characters are stored in memory.
All of the letters of the alphabet, numbers 0 through 9, punctuation marks, and other characters such as spaces, tabs, parentheses, brackets, backspace, etc. are encoded as 8-bit numbers using a standard called the ASCII character set. These codes are universally used and are generated by keyboards and displayed by devices such as LCDs.