String in code example
Example 1: how to create a string in c
char greeting[6] = {'H', 'e', 'l', 'l', 'o', '\0'};
char greeting[] = "Hello";
Example 2: declare string in c
char string[20];
Example 3: how to use \ in a string
var x = "The character \\ is called backslash.";
Code Result
\b Backspace
\f Form Feed
\n New Line
\r Carriage Return
\t Horizontal Tabulator
\v Vertical Tabulator