Escape sequence in C





 In C programming, an escape sequence is a combination of characters that begins with a backslash () followed by one or more characters, which represent a special character or control code. When an escape sequence is encountered in a string or character literal, it is replaced by a single character that has a special meaning to the compiler.

Here are some commonly used escape sequences in C:

  • \n: newline character
  • \t: horizontal tab character
  • \r: carriage return character
  • \b: backspace character
  • \a: alert (bell) character

No comments

Theme images by Jason Morrow. Powered by Blogger.