Sunday, 20 May 2012

What are escape sequences? Explain any three escape sequences with example.

An escape sequence provides special formatting control. An escape sequence consists of a backslash followed by a single character. Some character such as line feed, form feed, vertical tab, alert etc. cannot be typed through the keyboard. Such invisible characters can be made understood to the ‘C’ compiler through the use of execution characters or escape sequences. The term execution characters and escape sequences are used interchangeably. Escape sequence begins with \ sign.
The three escape sequences are describe below:
\n takes the cursor to the beginning of the next line; \t takes the cursor to the next horizontal tab stop; \v takes the cursor to the next vertical tab stop;

No comments:

Post a Comment