C Keywords

Keywords are reserved words that have a special meaning for the compiler. You cannot use them as names of your variables or functions. All keywords are in small letters.

List of 32 keywords in C

KeywordKeywordKeywordKeyword
autobreakcasechar
constcontinuedefaultdo
doubleelseenumextern
floatforgotoif
intlongregisterreturn
shortsignedsizeofstatic
structswitchtypedefunion
unsignedvoidvolatilewhile

Newer standards (C99 and later) added a few more, like inline, restrict and _Bool. The above 32 are the classic ones.

Keywords by use

UseKeywords
Data typesint, char, float, double, void, short, long, signed, unsigned
Decisionsif, else, switch, case, default
Loopsfor, while, do, break, continue, goto
Storageauto, static, extern, register
Othersconst, enum, struct, union, typedef, sizeof, return, volatile
Note: Printing int as a variable name gives a compile error. But Int or total are fine, because C is case sensitive.

Next: C Variables.


Congratulations! Chapter Finished. Learn more about the similar topics:
Exercises & Assignments
Write a C program to swap the values of two variables using a third variable
Write a C program to print words using spacing and new line characters
Write a C program to get the salary from the user and print it
Write a C program to find the size of int, float, long, double and char
Write a C program to get the marks of 5 subjects and find the total and average
Write a C program to calculate the perimeter of a rectangle
Write a C program to convert minutes into hours and minutes
Interview Questions & Answers
What is the difference between a variable and a constant in C?
What are the data types in C?
What is the difference between = and == in C?
What is the difference between ++i and i++ in C?
What is the use of the sizeof operator in C?
How to swap two numbers in C?