Keywords of C language

C Language – Keywords

  • Also known as reserved words or in-built words (Pre-defined words in Compiler)
  • Keywords having a fixed meaning, these meanings cannot be changed.
  • Keywords are used to construct for program statements.
  • There are 32 keywords used in C Language.
  • All keywords must be written in lowercase letters.
  • Keyword just like a command, have a fixed syntax, and rule regulation and it is a part of C-tokens.

Example:

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

C-Language (Keywords and their purpose)

 

Purpose/Objects (Keywords used for)

 

Keywords used

 

Primary data type –

 

int, char, float, double, void

 

Modify size (extend/reduce) of primary data type (these keyword are called modifier keywords) –

 

short, long

 

Qualifier (signed (+ve and –ve)  and unsigned (without signed)) –

 

signed, unsigned

 

User-defined data type –

 

typedef, enum

Derived data type –

 

struct, union

Storage Classes –

 

auto, extern, static, register

Conditional statement and selection/branching statements –

 

if,  else

switch

      break,

      default

      case

Looping/Iteration keywords –

 

for, while,  do

Jumping keywords –

 

goto, break, continue, return

Keywords used for constant declaration –

 

const

Keyword used for special operator –

 

sizeof

Other (qualifier) –

volatile

 

                            

                              Watch this Video Lecture

 

 

 

 

 

 

 

 

 

 

 

 

Leave a Reply