Character and string Literals
This lesson explains character and string literals, how they are used and what their types are.
We'll cover the following...
Character literals #
Character literals are specified within single quotes as in ‘a’, ‘\n’, ‘\x21’, etc.
As the character itself #
The character may be typed directly using the keyboard or copied from a separate text: ‘a’, ‘ş’.
As the character specifier #
The character literal may be specified using a backslash character followed by a special character. For example, ...
Access this course and 1400+ top-rated courses and projects.