Users Online

· Guests Online: 162

· Members Online: 0

· Total Members: 188
· Newest Member: meenachowdary055

Forum Threads

Newest Threads
No Threads created
Hottest Threads
No Threads created

Latest Articles

What are Escape Sequences (Character Escapes) in C Language

One or more characters following ‘\’ (the backslash) is considered to be a single character and is called the escape sequence. For example:

\? used to write multiple question marks from being interpreted as trigraphs in printf() statements

\” used to get the quotation marks inside the string literals

\’ used to write a character literal for a character

\\ used to write a backslash from being interpreted as a character escape
\a \b etc.


Escape sequences are used in a program to override the special meaning of characters in particular contexts! For example:

printf("What is your name? Are you \"some Xyz\"?");
/*
* OUTPUT: What is your name? Are you "some XYZ"?
* Note the Name in output enclosed in Quotation Marks
*/
Trigraphs

Trigraphs are all three-lettered characters, all begin with ?? (double question marks) followed by a character, represent some other character. Basically, they are used to complement a Character Set lacking for some characters. For example:

??( represent [
??) represent ]

Comments

No Comments have been Posted.

Post Comment

Please Login to Post a Comment.

Ratings

Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.
Render time: 0.92 seconds
10,814,783 unique visits