Skip to main content

Command Palette

Search for a command to run...

Escape Sequences

Published
1 min readView as Markdown

\n Newline

\t Tab

\r Carriage Return (the cursor will move to the first character of the current line, and any subsequent characters will overwrite the existing characters on the line)

\b The backspace character, represented by the escape sequence "\b", is used to move the cursor one position back in the current line of text.

#include <stdio.h>

int main() {
    printf("Hello,\nWorld!\n");
    printf("Hello,\tWorld!\n");
    printf("Hello,\bWorld!\n");
    printf("Hello,\rWorld!\n");

    return 0;
}

4 views

More from this blog

P

Programming Tutorials

89 posts