Skip to main content

C Keywords

A keyword is a reserved word. You cannot use it as a variable name, constant name, etc.

There are only 32 reserved words (keywords) in the C language.

A list of 32 keywords in the c language is 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

Basics usage of these keywords

>if, else, switch, case, default
Used for decision control programming structure.
>break
Used with any loop OR switch case.
>int, float, char, double, long
These are the data types and used during variable declaration.
>for, while, do
types of loop structures in C.
>void
One of the return type.
>goto
Used for redirecting the flow of execution.
>auto, signed, const, extern, register, unsigned
defines a variable.
>return
This keyword is used for returning a value.
>continue
It is generally used with for, while and dowhile loops, when compiler encounters this statement it performs the next iteration of the loop, skipping rest of the statements of current iteration.
>enum
Set of constants.
>sizeof
It is used to know the size.
>struct, typedef
Both of these keywords used in structures (Grouping of data types in a single record).
>union
It is a collection of variables, which shares the same memory location and memory storage.
>volatile

Comments