Escape sequences in C

The following code achieves the goal via text formatting and a hard-coded ASCII character value for newline (0x0A).

This behaves as desired with the words on sequential lines, but an escape sequence has advantages.

The \n escape sequence allows for shorter code by specifying the newline in the string literal, and for faster runtime by eliminating the text formatting operation.

Also, the compiler can map the escape sequence to a character encoding system other than ASCII and thus make the code more portable.

^ The non-standard sequence \e represents the escape character in GCC,[2] clang and tcc.

However, hex escape sequences longer than two hex digits might be useful inside a wide character or wide string literal (prefixed with L): ^ An octal escape sequence consists of a backslash followed by one to three octal digits.

In order to denote the byte with numerical value 1, followed by the digit 1, one could use "\1""1", since C concatenates adjacent string literals.

^ ^ Since the C99 standard, C supports escape sequences that denote Unicode code points, called universal character names.

Unlike other escape sequences, a universal character name may expand into more than one code unit.