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 को तोड़ना |
| case | switch statement का एक case |
| char | character data type |
| const | constant value |
| continue | लूप के अगले iteration पर जाना |
| default | switch में default block |
| do | do-while लूप की शुरुआत |
| double | double precision floating-point |
| else | if के साथ else condition |
| enum | enumeration data type |
| extern | external variable declaration |
| float | floating-point data type |
| for | for loop |
| goto | label पर jump करने के लिए |
| if | condition check करने के लिए |
| int | integer data type |
| long | बड़ा integer value |
| register | CPU register में variable store करना |
| return | function से value लौटाना |
| short | छोटा integer value |
| signed | signed number (positive/negative) |
| sizeof | data का size जानने के लिए |
| static | static storage class |
| struct | structure define करने के लिए |
| switch | multiple conditions handle करने के लिए |
| typedef | new name define करना |
| union | union data type |
| unsigned | positive number only |
| void | no return type |
| volatile | value को बार-बार update करने की अनुमति |
| while | while 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
int, if, return आदि। इनका उपयोग variable declare करने, conditions लगाने, loops चलाने जैसे कार्यों में किया जाता है।
int if = 5; यह invalid होगा।
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)