Wednesday - June 7, 2023

What is Escape sequence…?

Escape 2Bsequence

Escape sequence characters

Q) What is the escape sequence? What is its purpose? Explain the meaning of the following?

  1. b
  2. r
  3. f
  4. n
  • C supports a special type of character which is the combination of backslash (/)and another character e.g. it is known as an escape sequence character.
  • The is considered an escape character. This causes an escape from some normal interpretation of a string so that the next character means recognized as essentially one having a special meaning.

Following are the escape sequence characters in C with their meanings:

what is escape sequence in python, escape sequence in java, escape sequence in c, escape sequence example, escape sequence in c tutorialspoint, escape sequences are prefixed with, which of the following is an escape sequence mcq, what are escape sequences explain with example, escape sequence in c#, escaping computer science, escape sequence in python, escape sequence in java, escape character java, line feed escape sequence, escape sequences java, escape sequences python, escape sequence javascript, escape sequence in unix, escape sequence in php, c language is of which level language, escape sequences are prefixed with, special symbols in c, escape sequence in c, c++ special characters in strings,
Image Source ~ Crafted With ©Ishwaranand – 2020 ~ Image by ©Ishwaranand

Character meaning Escape sequence

a  – Audible alert (beep)
b  – Backspace
n  – New line
t   – Horizontal tab
f   – Form feed
r  – Carriage return
\  – Backslash
‘  – single quote
”   – Double quote
v   – Vertical tab
?   – Question mark
O   – Null character
  • a
It gives an audible beep.
printf(“a”)
  • b
This character works as backspace.
 printf (“abcdb”);
  printf (“xyz”);
output:
  abcxyz
  • n
It display the new line on screen
printf(“abcdnxyz”);
output:
abcd
xyz
  • t
It display the horizontal tab.
 printf(“abcdtxyz”);
output:
abcd  xyz
  • f
This character works as a form feed.
  • r
This character works as a carriage return.
printf(“abcrxyz”);
output:
xyz

Last updated on Sunday - May 21st, 2023

What is Escape sequence…?

Conditional Operator in C

.