# String literals spanning multiple lines

If you need a string variable which spans multiple lines:

:::{literalinclude} ../code/multiline-string-using-concatenation.c
:language: c
:::
:::{literalinclude} ../code/multiline-string-using-concatenation.txt
:language: text
:::

You can also use the following [GCC extension](https://gcc.gnu.org/onlinedocs/gcc/Raw-String-Literals.html), which is not part of the C standard, so it may be not be supported in every compiler. It is borrowed from the C++.

:::{literalinclude} ../code/raw-string-literals.c
:language: c
:::
:::{literalinclude} ../code/raw-string-literals.txt
:language: text
:::