C Keywords

C Tutorial

 C Keywords – Complete Beginner Guide

Keywords are the foundation of the C programming language.

If you want to write correct, efficient, and professional programs in C programming language, you must clearly understand C keywords.

In this fully rewritten, SEO-optimized, beginner-friendly guide, you’ll learn everything about C keywords in a simple and structured way—perfect for students, beginners, and exam preparation.


 What Are Keywords in C?

Keywords in C are reserved words that have a predefined meaning in the language.

These words are reserved by the compiler, so you cannot use them as variable names, function names, or identifiers.

Example:


Here:

  • int → keyword

  • age → variable

  • 20 → value


Why Keywords Cannot Be Used as Identifiers?

Keywords are building blocks of the C language.
Each keyword tells the compiler what to do.

If keywords were allowed as identifiers, the compiler would get confused.

 Invalid example:


 


How Many Keywords Are There in C?

According to the ANSI C standard (C89 / C90), there are:

32 Keywords in C

All keywords are written in lowercase letters.


 Complete List of C Keywords (With Categories)

For easy understanding, C keywords are grouped by function and purpose.


 Data Type Keywords

These keywords define what type of data a variable can store.

KeywordDescription
intInteger data type
charCharacter data type
floatDecimal (single precision)
doubleDecimal (double precision)
voidNo value / empty
shortShort integer
longLong integer
signedAllows negative values
unsignedOnly positive values

Example:


 


Control Flow Keywords (Decision Making)

These keywords control decision-making logic in a program.

KeywordPurpose
ifExecutes code if condition is true
elseExecutes if condition is false
switchMulti-condition branching
caseCase inside switch
defaultExecutes when no case matches

Example:


 


Looping Keywords (Iteration)

Used to execute a block of code multiple times.

KeywordDescription
forLoop with known count
whileLoop while condition is true
doExecutes at least once
breakExits loop
continueSkips current iteration

Example:


 


Storage Class Keywords

These keywords define scope, lifetime, and visibility of variables.

KeywordMeaning
autoDefault local variable
staticRetains value between calls
externDeclares global variable
registerSuggests CPU register storage

Example:


 


Function-Related Keywords

Used to define functions and return values.

KeywordUse
returnReturns value from function
voidFunction returns nothing

Example:


 


Jump Control Keywords

These keywords change the normal flow of execution.

KeywordDescription
breakExit loop or switch
continueSkip iteration
gotoJump to label

goto is rarely recommended.

Example:


 


Type Conversion & Size Keywords

Used for type-related operations.

KeywordPurpose
sizeofReturns memory size
typedefCreates alias
constMakes variable constant
volatilePrevents optimization

Example:


 

 Structure & Union Keywords

Used to create custom data types.

KeywordDescription
structCollection of variables
unionShared memory
enumNamed constants

Example:


 


Complete List of All 32 C Keywords


 


Common Beginner Mistakes with C Keywords

  •  Using keyword as variable name
  •  Writing keywords in uppercase
  •  Confusing keywords with functions
  •  Misusing static and extern
  •  Overusing goto

 Best Practices for Using C Keywords

  •  Always write keywords in lowercase
  •  Understand purpose before use
  •  Avoid unnecessary keywords
  •  Prefer structured programming
  • Learn keywords by category

Keywords vs Identifiers (Quick Comparison)

FeatureKeywordsIdentifiers
ReservedYesNo
PredefinedYesUser-defined
MeaningFixedCustom
Exampleint, ifage, sum

Real-World Example


 

Keywords used:

  • int

  • float

  • return


Frequently Asked Questions (FAQs)

1. How many keyword are there in C?

There are 32 keyword in standard C.

2. Can keyword change in future versions?

Standard C keeps keyword stable, but newer versions (C99, C11) add features—not many new keyword.

3. Are keyword case-sensitive?

Yes. All keywords must be written in lowercase.

4. Is printf a keyword?

No. printf is a library function, not a keyword.

5. Why is goto discouraged?

It makes programs harder to read and maintain.


 Why Learning C Keyword Is Important

Understanding keyword helps you:

  • Read programs easily

  • Write error-free code

  • Crack exams and interviews

  • Learn advanced concepts

  • Build strong fundamentals

Keyword are the grammar of C language.


Final Thoughts

C keyword are:

  • Limited in number

  • Powerful in meaning

  • Essential for every program

If you master keyword, you automatically improve your:

  • Syntax knowledge

  • Logical thinking

  • Programming confidence

Once you understand C keyword clearly, you’re ready to move on to:

  • Variables
  •  Operators
  • Control Statements
  •  Functions
  •  Pointers

You may also like...