C Keywords and Identifiers
Right now, we will find out about catchphrases; saved words in C programming that are a piece of the linguistic structure. Likewise, you will find out about identifiers and how to name them.
C Character set
A character set is a lot of letters in order, letters and some exceptional characters that are legitimate in C language.Alphabets
| Uppercase: A B C ................................... X Y Z Lowercase: a b c ...................................... x y z |
|---|
C accepts both lowercase and uppercase alphabets as variables and functions.
Digits
| 0 1 2 3 4 5 6 7 8 9 |
|---|
Special Characters
| , | < | > | . | _ |
|---|---|---|---|---|
| ( | ) | ; | $ | : |
| % | [ | ] | # | ? |
| ' | & | { | } | " |
| ^ | ! | * | / | | |
| - | \ | ~ | + |
White space Characters
The characters that are invisible are called white spaces.
Example: Space bar, Enter key, the tab key, etc.
Example: Space bar, Enter key, the tab key, etc.
C Keywords/Reserved words
Keywords are the inbuilt words that have special meaning to the program and used for a different purpose.
int morning;
Here, int is a watchword that demonstrates cash is a variable of type int (whole number).
As C is a case delicate language, all catchphrases must be written in lowercase. Here is a rundown of all watchwords permitted in ANSI C.
There are 32 keywords in c language.
| auto | double | int | struct |
|---|---|---|---|
| break | else | long | switch |
| case | enum | register | typedef |
| char | extern | return | union |
| const | float | short | unsigned |
| continue | for | static | void |
| default | goto | sizeof | volatile |
| do | if | signed | while |
C Identifiers
An identifier is a name by which we can identify value, an Array, a function, etc.
- int ram;
- double sam;
Here, ram and sam are identifiers.
Restriction while giving the identifier name
1. Maximum 31 characters are allowed for a name, but it is better to use a maximum of 8 characters.
2. A name can't be started with a digit, but we can use digit after an alphabet.
example: a1, a9
3. No special characters are allowed for a name except underscore(_)
example: ab+❌
a_b✔️
_ab✔️
4. No keywords are allowed for a name.

0 Comments