You will learn about keywords in this tutorial; reserved words in C programming that are part of the syntax. You will also learn how to name identifiers.
In C language, a character set consists of alphabets, letters, and some special characters.
"Uppercase: A B C ................................... X Y Z
Lowercase: a b c ...................................... x y z"
The C programming language accepts both lowercase and uppercase alphabets as variables and functions.
"0 1 2 3 4 5 6 7 8 9"
, | < | > | . | _ |
( | ) | ; | $ | : |
% | [ | ] | # | ? |
' | & | { | } | " |
^ | ! | * | / | | |
- | \ | ~ | + |
Newlines, horizontal tabs, carriage returns, and form feeds.
KeyCompilers have special meanings for predefined, reserved words used in programming.ywords are part of the syntax and they cannot be used as an identifier. For example:
"int money;"
The keyword int indicates that money is a variable of type int (integer).
Because C is a case-sensitive language, all keywords must be written in lowercase. Here is a list of all ANSI C keywords.
auto | double | int | struct |
break | else | long | switch |
case | enum | register | typedef |
char | extern | return | union |
continue | for | signed | void |
do | if | static | while |
default | goto | sizeof | volatile |
const | float | short | unsigned |
The syntax and application of each of these keywords will be discussed in their respective topics. If you want a brief overview of these keywords without going further, visit List of all C programming keywords.
An identifier is a name that is given to an entity, such as a variable, function, or structure.
Unique identifiers are required. To identify an entity during the execution of a program, they are used to give it a unique name. For instance:
"int money;
double accountBalance;"
When following the above rule, you can choose any name for your identifier. However, give meaningful names to those identifiers that make sense.