Character set of C
character:- It denotes any alphabet, digit or special symbol used to represent information.
Use:- These characters can be combined to form variables. C uses constants, variables, operators, keywords and expressions as building blocks to form a basic C program.
Character set:- The character set is the fundamental raw material of any language and they are used to represent information. Like natural languages, computer language will also have well defined character set, which is useful to build the programs.
The characters in C are grouped into the following two categories:
1. Source character set
a. Alphabets
b. Digits
c. Special Characters
d. White Spaces
2. Execution character set
a. Escape Sequence
Source character set
ALPHABETS
Uppercase letters A-Z
Lowercase letters a-z
DIGITS 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
SPECIAL CHARACTERS
~ tilde % percent sign | vertical bar @ at symbol + plus sign < less than
_ underscore - minus sign > greater than ^ caret # number sign = equal to
& ampersand $ dollar sign / slash ( left parenthesis * asterisk \ back slash
) right parenthesis ′ apostrophe : colon [ left bracket " quotation mark ; semicolon
] right bracket ! exclamation mark , comma { left flower brace ? Question mark . dot operator
} right flower brace
WHITESPACE CHARACTERS
\b blank space \t horizontal tab \r carriage return \n new line
\\ Back slash \’ Single quote \" Double quote \? Question mark \0 Null \a Alarm (bell)
Execution Character Set
Certain ASCII characters are unprintable, which means they are not displayed on the screen or printer. Those characters perform other functions aside from displaying text. Examples are backspacing, moving to a newline, or ringing a bell.
They are used in output statements. Escape sequence usually consists of a backslash and a letter or a combination of digits. An escape sequence is considered as a single character but a valid character constant.
These are employed at the time of execution of the program. Execution characters set are always represented by a backslash (\) followed by a character. Note that each one of character constants represents one character, although they consist of two characters. These characters combinations are called as escape sequence.
character:- It denotes any alphabet, digit or special symbol used to represent information.
Use:- These characters can be combined to form variables. C uses constants, variables, operators, keywords and expressions as building blocks to form a basic C program.
Character set:- The character set is the fundamental raw material of any language and they are used to represent information. Like natural languages, computer language will also have well defined character set, which is useful to build the programs.
The characters in C are grouped into the following two categories:
1. Source character set
a. Alphabets
b. Digits
c. Special Characters
d. White Spaces
2. Execution character set
a. Escape Sequence
Source character set
ALPHABETS
Uppercase letters A-Z
Lowercase letters a-z
DIGITS 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
SPECIAL CHARACTERS
~ tilde % percent sign | vertical bar @ at symbol + plus sign < less than
_ underscore - minus sign > greater than ^ caret # number sign = equal to
& ampersand $ dollar sign / slash ( left parenthesis * asterisk \ back slash
) right parenthesis ′ apostrophe : colon [ left bracket " quotation mark ; semicolon
] right bracket ! exclamation mark , comma { left flower brace ? Question mark . dot operator
} right flower brace
WHITESPACE CHARACTERS
\b blank space \t horizontal tab \r carriage return \n new line
\\ Back slash \’ Single quote \" Double quote \? Question mark \0 Null \a Alarm (bell)
Execution Character Set
Certain ASCII characters are unprintable, which means they are not displayed on the screen or printer. Those characters perform other functions aside from displaying text. Examples are backspacing, moving to a newline, or ringing a bell.
They are used in output statements. Escape sequence usually consists of a backslash and a letter or a combination of digits. An escape sequence is considered as a single character but a valid character constant.
These are employed at the time of execution of the program. Execution characters set are always represented by a backslash (\) followed by a character. Note that each one of character constants represents one character, although they consist of two characters. These characters combinations are called as escape sequence.
No comments:
Post a Comment