Escape sequence:
- In order to design the out put of the program in a pre formatted way (Elegant).
- c language supports escape characters.
- By using this we can design the out put as per your requirement.
- It will be defined in the out put statement like printf( ).
- This can be used any where in the printf( ) with in the double quotations.
- Usually they can be either starting or ending of the printf( ).
- Every escape sequence character will occupies 1 byte of space.
\n ----- New line
\t ----- Tab character
\b ----- Back space
\r ----- carriage return
\\ ----- \
\" ----- "
\a ----- Alert ( beep sound )
\f ----- From feed
\v ----- Vertical
\h ----- Horizontal
\o ----- Null character etc,.
comments:
At the time of program execution some statements do not want to execute such statements are kept in the comments with out deleting that statements. they are two types of comments. these are....
1. single line comments ( // )
Ex : hai how are you
// hello
output : hai how are you
2. multi line comment ( /* */ )
Ex : hai /*hello*/ how are you
output : hai how are you
'c' language does not supports nested comments( */ ).
For documentation of the programming we require comments.