Last updated : July 27, 2026

Keywords Tutorials

Programming

Keywords in C

Keywords are reserved words in C that have predefined meanings. These words are part of the C language syntax and are recognized by the compiler.

Important Points

  • Keywords have special meanings in C.

  • They are predefined by the language.

  • Keywords cannot be used as identifiers.

  • The compiler generates an error if a keyword is used as a variable, function, or structure name.


List of C Keywords

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

Using a Keyword as an Identifier

Keywords cannot be used as variable names, function names, or structure names.

Incorrect Example

#include <stdio.h>

int main() {

    int return = 10;

    printf("%d", return);

    return 0;
}

Output

error: expected identifier before 'return'

Reason

The word return is a reserved keyword in C, so it cannot be used as a variable name.


Key Points

  • Keywords are reserved words in C.

  • They have predefined meanings.

  • Keywords cannot be used as identifiers.

  • C contains 32 standard keywords.

  • Keywords are used for data types, loops, conditions, storage classes, and user-defined types.

  • The compiler recognizes keywords automatically.

Job PortalJobs
C Keywords Tutorial with Examples | SoftCrayons