Keywords in C language

Keywords are predefined reserved words in the C language that have a special meaning and cannot be used as variable names, function names, or any other identifiers in the program. These keywords are part of the syntax and grammar of the language and are used to define the structure of the program. Here is a list of all the keywords in the C language:

List of the keywords in C language

There are only 32 keywords available in C.

some keywords in C programming language

Here is a brief explanation of each keyword:

  1. auto – Specifies that a variable has automatic storage duration.
  2. break – Terminates the nearest enclosing loop or switch statement.
  3. case – Labels a statement within a switch statement.
  4. char – Specifies a character type.
  5. const – Specifies that a variable’s value cannot be changed.
  6. continue – Skips the rest of the loop body and continues with the next iteration.
  7. default – Specifies the default label in a switch statement.
  8. do – Starts a do-while loop.
  9. double – Specifies a double-precision floating-point type.
  10. else – Specifies an alternative to an if statement.
  11. enum – Specifies an enumeration type.
  12. extern – Specifies that a variable or function is defined in another file.
  13. float – Specifies a single-precision floating-point type.
  14. for – Starts a for loop.
  15. goto – Transfers control to another part of the program.
  16. if – Starts an if statement.
  17. int – Specifies an integer type.
  18. long – Specifies a long integer type.
  19. register – Specifies that a variable is stored in a register.
  20. return – Returns a value from a function.
  21. short – Specifies a short integer type.
  22. signed – Specifies a signed integer type.
  23. sizeof – Returns the size of a type or variable.
  24. static – Specifies that a variable or function has static storage duration.
  25. struct – Specifies a structure type.
  26. switch – Starts a switch statement.
  27. typedef – Specifies a type alias.
  28. union – Specifies a union type.
  29. unsigned – Specifies an unsigned integer type.
  30. void – Specifies a type with no value.
  31. volatile – Specifies that a variable may be changed by external factors.
  32. while – Starts a while loop.

In conclusion, these keywords are an essential part of the C programming language, and their correct usage is necessary to create well-formed and meaningful C programs.

Recommended Post: