What are Keywords in C Programming

Published By: JANET

Keywords in C


Keywords in C


Keywords are predefined reserved words, they have pre-implemented functionality to the compiler. There are 32 keywords in C language, they can not be used as variable or identifier names.


Keywords help us to use the actual power of C programming, with the help of these 32 keywords C we write C programs, each keyword has been pre-defined to do a special task.


Important Points About Keywords in C


  • There are 32 keywords in the C language.
  • Each keyword is meant to perform a specific function in a C program.
  • All keywords have fixed meanings and these can not be changed.
  • C keywords cannot be used as names of variables, names for functions, or as user-defined Identifiers.


List of 32 Keywords in C


  • 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


Note: We have already used some keywords in previous chapters such as int, void, float, char, etc. In upcoming chapters, we will learn all keywords listed above.


Use of Keywords in C Programs


#include<stdio.h>                                                                       

void main()

 {

     int first_Num;

     int second_Num;

     int result;

     first_Num=20;

     second_Num=30;

     result = first_Num + second_Num;

     printf(result);

 }


Program Explained

  • In the above program void, main, int are keywords.
  • first_Num, second_Num, result are variables

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

LifeStyle & Fun

© 2024 GDATAMART.COM (All Rights Reserved)