Wednesday, April 9, 2014

Special characters in C


//Special characters:

C language
C language

 


'\a' // alert (bell) character
'\n' // newline character
'\t' // tab character (left justifies text)
'\v' // vertical tab
'\f' // new page (formfeed)
'\r' // carriage return
'\b' // backspace character
'\0' // null character. Usually put at end of strings in C lang. 
     //   hello\n\0. \0 used by convention to mark end of string. 
'\\' // backslash
'\?' // question mark
'\'' // single quote
'\"' // double quote
'\xhh' // hexadecimal number. Example: '\xb' = vertical tab character
'\ooo' // octal number. Example: '\013' = vertical tab character
 
 You may also like to read Dangling Pointer Problem  

0 comments:

Post a Comment