A character constant consists of a single digit or a single special symbol enclosed within a pair of single inverted commas. The maximum length of a character constant can be 1 character.
e.g. --> 'a', 'i' , '5', '='.
There are some character sequence constants which are used in C to represented special action, these are called C Escape Sequence.
List of these escape sequence and its tasks are given below:
\a : audible bell
\f : form feed
\r : carriage return
\v : vertical tab
\' : single quote
\? : question mark
\HHH: 1 to 3 digit hex value.
\b : backspace
\n : newline
\t : horizontal tab
\\ : backslash
\" : double quote.
\000 : 1 to 3 digit octal value
0 comments:
Post a Comment