Keywords in c

You can't use a keyword as an identifier in your C programs, its reserved words in C library and used to perform an internal operation. The meaning and working of these keywords are already known to the compiler.There are a total of 32 keywords in C.

C Keywords
auto double int struct
break else long switch
case enum register typedef
char extern return union
const float short unsigned
continue for signed void
default goto sizeof volatile
do if static while

Example 1 : int x;
Here, int is a keyword that indicates x is a variable of type int (integer).

Example 2 : int do;
In above example we can not use do as variable name as it is keyword.In that case compiler generate error

NOTE : As C is a case sensitive language, all keywords must be written in lowercase.

Post a Comment

If you have any doubts, Please let me know
Thanks!

Previous Post Next Post