Here are some commonly used escape sequences in C++:
\\ – Backslash: Represents a single backslash () in the output.
\' – Single Quote: Represents a single quote (‘) character.
\" – Double Quote: Represents a double quote (“) character.
\n – Newline: Inserts a line break.
\t – Horizontal Tab: Inserts a horizontal tab space.
\r – Carriage Return: Moves the cursor to the beginning of the current line.
\b – Backspace: Moves the cursor one position back.
\f – Form Feed: Advances the cursor to the next page or form feed.
\v – Vertical Tab: Inserts a vertical tab space.
\a – Alert: Produces a system alert or beep sound.
\? – Question Mark: Represents a question mark (?) character.
\ooo – Octal Number: Represents a character using its octal value, where ‘ooo’ is a 1- to 3-digit octal number.
\xhh – Hexadecimal Number: Represents a character using its hexadecimal value, where ‘hh’ is a 1- to 2-digit hexadecimal number.