In computing, the Character set is a defined list of characters recognized by the computer software and hardware. Here, each character is represented by a number. For example :- A is represented by 65 and a is by 97.
Like all other languages, C has their own character set named as ASCII(American standard code for information interchange) Character set.
The character set contains digits, alphabet, white spaces, escape sequences and special symbols. These characters can be combined to make variables.
C uses variables, constants, keywords, expressions and operators as building blocks to form a C program. Each C program is a set of different statements and each statement is a set of different lexims. In computing, each and every character is considered as a single lexim.
There are 256 characters in the ASCII character set.
Valid C characters are listed below:
Non-alphabetic and non-numeric characters such as #, @,%,$ etc. are called special characters in computation.
Valid special characters are listed below:
The ASCII Character set reserves first 32 codes ( from 0 to 31) for control characters.
Let us understand, What are control characters?
In Computing, control character( non printing character) is a special character in character set , that does not print a written symbol. They have special purposes to do with cursor movement and are written into an ordinary string or a character by typing a backslash character ( \ ) followed by some other character.
The control characters are generally used in telecommunication for in-band signaling. These are used to control devices or provide meta information of data streams that are stored on magnetic tape.
Other than these 32 characters in the ASCII set, 95( from 32 to 127) characters are printable characters in ASCII character set except space( code 32).
It is a sequence of characters that does not represent itself when used inside a String literal, but is translated into another character sequence that may be difficult or impossible to represent directly.
In C language, an Escape sequence consists of two characters the first one is backslash (/) and the other one will be a character or a digit which will determine interpretation of the sequence.
The Control Characters and escape sequences are listed below :
In the C language, we often used 128 characters ( from 0 to 127). Characters from 128 to 255 are called extended characters in ASCII character set.
How to print ASCII value through a C program:
Note: C language does not use every character we found on a keyboard.