Friday, July 29, 2016

C Basics - Keywords in C

Keywords are the words whose meaning has already been explained to the C compiler. The keywords cannot be used as variable names. There are only 32 keywords available in C. Some compiler vendor provide the own keywords. Such compiler specific keyword should be preceded by two underscores.

The C language uses the following keywords:
char short int long float double
unsigned signed
auto static extern register
const volatile
if else
for do while
switch case default
break continue goto
struct union enum typedef
void return

You cannot redefine keywords. However, you can specify text to be substituted for keywords before compilation by using C preprocessor directives.

Related topics:
Tokens in C   |   Character Set in C   |   White Space Characters in C   |   Trigraph Characters in C   |   Extended Characters in C   |   Escape Sequence in C   |   Comments in C   |   Identifiers in C   |   Declaration in C

List of topics: C Programming

No comments:

Post a Comment