Keywords in C Language – Definition, List and Examples

A keyword is a reserved word in a programming language that has a predefined meaning and specific purpose. In C language, keywords are also known as reserved words because they cannot be used as user-defined names such as variable names, function names or array names. Each keyword has a specific meaning and is used to perform a particular task in a C program. C language is case-sensitive, so keywords are written in lowercase letters. For example, int is a keyword, whereas Int and INT are not keywords.

Keyword किसी Programming Language का एक Reserved Word होता है जिसका पहले से निर्धारित अर्थ एवं विशेष उद्देश्य होता है। C Language में Keywords को Reserved Words भी कहा जाता है क्योंकि इनका उपयोग Programmer द्वारा Variable Name, Function Name या Array Name के रूप में नहीं किया जा सकता है। प्रत्येक Keyword का एक निश्चित अर्थ होता है तथा इसका उपयोग C Program में किसी विशेष कार्य को करने के लिए किया जाता है। C Language Case-Sensitive होती है, इसलिए Keywords को छोटे अक्षरों में लिखा जाता है। उदाहरण के लिए int एक Keyword है, जबकि Int और INT Keywords नहीं हैं।

List of 32 Keywords in C Language (C89/C90)

The original ANSI C (C89/C90) standard defines 32 keywords. These keywords are as follows:

Original ANSI C (C89/C90) Standard में कुल 32 Keywords निर्धारित किए गए हैं। ये Keywords निम्नलिखित हैं:

No.KeywordNo.Keyword
1auto17int
2break18long
3case19register
4char20return
5const21short
6continue22signed
7default23sizeof
8do24static
9double25struct
10else26switch
11enum27typedef
12extern28union
13float29unsigned
14for30void
15goto31volatile
16if32while

Additional 5 Keywords in C99

The C99 standard introduced five additional keywords, increasing the total number of keywords to 37.

C99 Standard में पाँच अतिरिक्त Keywords शामिल किए गए, जिससे कुल Keywords की संख्या 37 हो गई।

The additional keywords are:

अतिरिक्त Keywords निम्नलिखित हैं:

  1. inline

  2. restrict

  3. _Bool

  4. _Complex

  5. _Imaginary

The above list of 37 keywords refers to C99. Later C standards introduced additional keywords and language features.

ऊपर दी गई 37 Keywords की सूची C99 Standard के अनुसार है। बाद के C Standards में और भी Keywords तथा Language Features शामिल किए गए हैं।

Uses of Important C Keywords

Some important keywords and their uses are explained below:

कुछ महत्वपूर्ण Keywords तथा उनके उपयोग निम्नलिखित हैं:

KeywordPurpose
intDeclares an integer variable.
charDeclares a character variable.
floatDeclares a floating-point variable.
doubleDeclares a double-precision floating-point variable.
ifPerforms conditional execution.
elseSpecifies an alternative block.
forUsed to create a loop.
whileExecutes a loop while a condition is true.
doUsed with while to create a do-while loop.
breakTerminates a loop or switch statement.
continueSkips the remaining statements of the current loop iteration.
switchSelects one of several execution paths.
caseDefines a case within a switch statement.
defaultDefines the default case in a switch statement.
returnReturns control from a function.
voidSpecifies no value or no parameters in certain declarations.
structDefines a structure.
unionDefines a union.
enumDefines an enumeration.
typedefCreates an alternative name for a type.
sizeofDetermines the size of a type or object in bytes.
constSpecifies an object that cannot be modified through that identifier.
staticSpecifies static storage duration or internal linkage, depending on its use.
externDeclares an identifier with external linkage or refers to an object/function defined elsewhere.

Example Program Using C Keywords

The following program uses different C keywords such as int, if, else and return.

निम्नलिखित प्रोग्राम में C Language के विभिन्न Keywords जैसे int, if, else तथा return का उपयोग किया गया है।

#include <stdio.h>
int main(void)
{
int number = 10;
if (number > 0)
{
printf("Number is positive.");
}
else
{
printf("Number is not positive.");
}
return 0;
}

Output:

Number is positive.

In this program, int, if, else and return are keywords. The word number is an identifier, and 10 is an integer constant.

इस प्रोग्राम में int, if, else तथा return Keywords हैं। number एक Identifier है तथा 10 एक Integer Constant है।

Important Points about Keywords in C

  • Keywords are reserved words with predefined meanings.

  • Keywords cannot be used as variable names or function names.

  • C language is case-sensitive.

  • The original ANSI C (C89/C90) standard contains 32 keywords.

  • C99 introduced five additional keywords, making a total of 37.

  • sizeof is a single keyword.

  • typedef is a keyword, whereas type is not a C keyword.

  • Later C standards introduced additional keywords.

  • Keywords Reserved Words होते हैं जिनका अर्थ पहले से निर्धारित होता है।

  • Keywords का उपयोग Variable Name या Function Name के रूप में नहीं किया जा सकता है।

  • C Language Case-Sensitive होती है।

  • Original ANSI C (C89/C90) Standard में 32 Keywords हैं।

  • C99 Standard में पाँच अतिरिक्त Keywords शामिल किए गए, जिससे इनकी कुल संख्या 37 हो गई।

  • sizeof एक ही Keyword है।

  • typedef एक Keyword है, जबकि type C Language का Keyword नहीं है।

  • बाद के C Standards में और भी Keywords शामिल किए गए हैं।

Comments

Popular posts from this blog

C Language Topics in Hindi and English

Complete C Programming Syllabus | Advanced C Roadmap for Students

Top High-Paying Tech Skills to Learn in 2025