Keywords are reserved words that have a special meaning to the C compiler. There are 32 keywords in C Language. These keywords can not be used as variable names and are written in lowercase letters.
32 Keywords in C programming are given below:
auto | break | case | char |
const | continue | default | do |
double | else | enum | extern |
float | for | goto | if |
int | long | register | return |
short | signed | sizeof | static |
struct | switch | typedef | union |
unsigned | void | volatile | while |
Now we are describing some keywords:
auto
This keyword declares an automatic variable.
Example:
auto int age;
Here the above example is defined as 'age' is an automatic variable of type int.
char
char keyword is used to declare a character type variable.
Example:
char name;
Here we are defining the 'name' as a variable of type char.
float
This keyword is used for declaring a floating point variable.
Example:
float b;
Here 'b' is a single-precision floating type variable.
double
This keyword is used for declaring a double variable.
Example:
double a;
Here, the above example is defined as 'a' is a double-precision floating type variable.
const
This keyword is used for declaring an identifier as constant.
Example:
const int x=5;
Here 'x' is defined as a constant with a fixed value 5.