C Tutorial Char constants
Introduction to C language
Integer types
Char constants
Int constants
Type combination and promotion
Int overflow
Floating point types
Comments
Variables
Assignment operator
Truncation
Int vs float arithmatic
Mathematical operators
Unary Increment Operators
Pre and Post Variations
C Programming Cleverness and Ego Issues
Relational Operators
Logical Operators
Bitwise Operators
Other Assignment Operators

 

 
 
 
 

 

HOME
 

 

char Constants

A char constant is written with single quotes (') like 'A' or 'z'. The char constant 'A' is really just a synonym for the ordinary integer value 65 which is the ASCII value for 4

 uppercase 'A'. There are special case char constants, such as '\t' for tab, for characters

which are not convenient to type on a keyboard.

 

'A'    uppercase 'A' character

 

'\n'   newline character

 

'\t'   tab character

 

'\0'   the "null" character -- integer value 0 (different from the char digit '0')

 

'\012' the character with value 12 in octal, which is decimal 10

 

  Want more information and Video ???