Character

A character constant is a character enclosed in single quotes, as in 'x'. The value of a character constant is the numerical value of the character in the machine's character set, for example:

'A'valid (value is 65 for the ASCII character set)
'AB'invalid (more than one character)

Certain special characters, such as the single quote ' and the backslash \, may be represented according to the following table of escape sequences:

newlineNL(LF)'\n'
horizontal tabHT'\t'
backspaceBS'\b'
carriage returnCR'\r'
form feedFF'\f'
backslash\'\\'
single quote''\''
double quote"'\"'
nullNUL'\0'
bit patternddd'\ddd'

The escape \ddd consists of the backslash followed by a stream of octal digits which are taken to specify the value of the desired character. If the character following a backslash is not one of those specified, the backslash is ignored.


[BACK] [FORWARD] [HOME] [UP] [HELP]