Notes in Hindi

What are Keywords in C Language in Hindi

/ BCA / Programming with C and CPP

What are Keywords in C Language in Hindi

What are Keywords in C Language in Hindi

Introduction

C Language programming सीखते समय "Keywords" एक बहुत ही जरूरी और बेसिक टॉपिक है। अगर आप beginner हैं, तो सबसे पहले आपको ये समझना होगा कि Keywords क्या होते हैं, ये क्यों जरूरी हैं और इनका कहां-कहां उपयोग होता है। C Language में Keywords का मतलब होता है ऐसे words जिन्हें Language के द्वारा पहले से ही किसी खास काम के लिए reserve किया गया है। इन्हें आप बदल नहीं सकते, और न ही इनका उपयोग किसी variable, function या identifier के नाम के रूप में कर सकते हैं।

What are Keywords in C Language

Keywords वे predefined words होते हैं जिनका अर्थ C Compiler के लिए पहले से तय होता है। ये words C Language के नियमों और structure को define करते हैं। हर Keyword का एक विशेष meaning होता है, और इनका उपयोग किसी particular purpose के लिए ही होता है। जैसे — int keyword का उपयोग integer type variable को define करने के लिए किया जाता है।

  • Keywords को हम lowercase में लिखते हैं। जैसे — if, while, return
  • Keywords को variable या function name के रूप में इस्तेमाल नहीं किया जा सकता।
  • ये Compiler को बताते हैं कि किसी instruction या syntax का उद्देश्य क्या है।

List of all Keywords used in C Language in Hindi

C Language में कुल 32 Keywords होते हैं। ये सभी Language के built-in parts हैं और सभी का अलग-अलग काम होता है। नीचे एक table के माध्यम से सभी Keywords की list दी गई है:

Keyword Meaning (हिंदी में)
autoस्वचालित variable declaration
breakलूप या switch को तोड़ना
caseswitch statement का एक case
charcharacter data type
constconstant value
continueलूप के अगले iteration पर जाना
defaultswitch में default block
dodo-while लूप की शुरुआत
doubledouble precision floating-point
elseif के साथ else condition
enumenumeration data type
externexternal variable declaration
floatfloating-point data type
forfor loop
gotolabel पर jump करने के लिए
ifcondition check करने के लिए
intinteger data type
longबड़ा integer value
registerCPU register में variable store करना
returnfunction से value लौटाना
shortछोटा integer value
signedsigned number (positive/negative)
sizeofdata का size जानने के लिए
staticstatic storage class
structstructure define करने के लिए
switchmultiple conditions handle करने के लिए
typedefnew name define करना
unionunion data type
unsignedpositive number only
voidno return type
volatilevalue को बार-बार update करने की अनुमति
whilewhile loop

Use of Keywords in variable declaration in Hindi

C Language में variable को declare करने के लिए Keywords का उपयोग सबसे जरूरी step है। जब भी आप कोई variable बनाते हैं, आपको बताना होता है कि वह किस प्रकार का डेटा रखेगा। यही काम Data type Keywords करते हैं जैसे — int, char, float आदि।

  • int a; — इसका मतलब है variable "a" एक integer type का variable है।
  • float salary; — यह एक floating-point number को store करने वाला variable है।
  • char grade; — यह एक character value रखने वाला variable है।

इसके अलावा कुछ storage class Keywords होते हैं जो ये बताते हैं कि variable memory में कहां store होगा और उसकी life कितनी होगी, जैसे:

  • auto — local variable को define करता है जो function के अंदर होता है।
  • static — एक बार assign होने पर value हमेशा बनी रहती है।
  • extern — variable को दूसरे file से access करने के लिए होता है।
  • register — variable को CPU register में रखने की कोशिश करता है ताकि execution fast हो।

Rules and restrictions of using Keywords in C in Hindi

C Language में Keywords का उपयोग करते समय कुछ विशेष नियम और प्रतिबंध होते हैं जिनका पालन करना जरूरी है। यदि आप इन नियमों को नहीं मानते, तो compiler error देगा।

  • कोई भी Keyword variable, function या identifier के नाम के रूप में उपयोग नहीं किया जा सकता। जैसे — int if; यह invalid है।
  • Keywords हमेशा lowercase में होते हैं। अगर आप uppercase में लिखते हैं, तो compiler error नहीं देगा, लेकिन यह standard practice के खिलाफ है।
  • Keywords को redefine नहीं किया जा सकता। आप int या float को किसी और उद्देश्य से define नहीं कर सकते।
  • Keywords केवल predefined होते हैं। आप खुद से नया Keyword नहीं बना सकते।

Examples of Invalid Usage

// गलत उदाहरण - Invalid Syntax int if = 5; // 'if' एक keyword है, इसे variable के रूप में इस्तेमाल नहीं किया जा सकता float while; // 'while' एक keyword है char return; // 'return' को variable name नहीं बना सकते

Examples of Valid Usage

// सही उदाहरण - Valid Syntax int marks = 90; char grade = 'A'; float percentage = 86.5;

Final Note

Keywords को समझना हर C Programmer के लिए अनिवार्य है। ये Language की backbone की तरह काम करते हैं। इनका सही उपयोग करना आपके program को compile कराने में मदद करता है और structure को बेहतर बनाता है। अगर आप keywords के basic rules और restrictions को समझ लेंगे, तो आपके future programs logical और error-free बनेंगे।

FAQs

Keywords वो predefined words होते हैं जिन्हें C Compiler पहले से ही पहचानता है और जिनका एक fixed meaning होता है। जैसे - int, if, return आदि। इनका उपयोग variable declare करने, conditions लगाने, loops चलाने जैसे कार्यों में किया जाता है।
C Language में कुल 32 Keywords होते हैं जो अलग-अलग प्रकार के कार्यों के लिए उपयोग किए जाते हैं। ये सभी language के predefined नियमों को follow करते हैं।
नहीं, Keywords को variable name की तरह उपयोग नहीं किया जा सकता क्योंकि उनका अर्थ पहले से ही C Compiler के लिए तय होता है। जैसे - int if = 5; यह invalid होगा।
Integer variable declare करने के लिए int keyword का उपयोग किया जाता है। जैसे - int number = 10;
return keyword का उपयोग function से value वापस करने के लिए किया जाता है। जैसे - return 0; main function में program का successful end दर्शाता है।
हाँ, if C Language का एक बहुत महत्वपूर्ण keyword है जिसका उपयोग condition check करने के लिए किया जाता है। जैसे - if(a > b)

Please Give Us Feedback