String Literals

Strings are a sequence of characters enclosed in double quotes.


"Hello World!\n"

The escape sequences used to enter special characters into strings are shown in the Table below.

Escape sequences for strings.
Escape Result
\n new line
\t tab
\\ \
\ddd Character represented by the 3 digit octal code ddd (where 0 ≤ d ≤ 7)