Backslash character constants



Enclosing character constants in single quotes works for most printing characters.A few , however, such as carriage return, can't be. For this reason, C includes special backslash character constants, so that you may easily enter these special characters as constants. You should use the backslash codes instead of their ASCII equivalents to help insure portability.
List of backslash character constants are as follows:-

Code Meaning

\b Backspace
\f Form feed
\n New line
\r Carriage return
\t Horizontal tab
\" Double quote
\' Single quote
\\ Backslash
\v Vertical tab
\a Alert(very small sound)
\? Question mark
\N Octal constant (N is an octal constant)
\xN Hexadecimal constant (N is an hexadecimal constant)

Comments

Popular posts from this blog

Components of C language

Decision making using if statement

How to make payment for final certificate, migration, provisional for the students of last semester of ptu?