Character set of C


Character set[edit]

The basic C source character set includes the following characters:
  • Lowercase and uppercase letters: az AZ
  • Decimal digits: 09
  • Graphic characters: ! " # % & ' ( ) * + , - . / : ; < = > ? [ \ ] ^ _ { | } ~
  • Whitespace charactersspacehorizontal tabvertical tabform feednewline
Newline indicates the end of a text line; it need not correspond to an actual single character, although for convenience C treats it as one.
Additional multibyte encoded characters may be used in string literals, but they are not entirely portable. The latest C standard (C11) allows multinational Unicode characters to be embedded portably within C source text by using \uXXXX or \UXXXXXXXX encoding (where the X denotes a hexadecimal character), although this feature is not yet widely implemented.
The basic C execution character set contains the same characters, along with representations for alertbackspace, and carriage returnRun-time support for extended character sets has increased with each revision of the C standard.


Share this

Related Posts

Previous
Next Post »