📌 Table of Contents
- Introduction – C में Keywords क्यों ज़रूरी हैं?
- C में Keywords की Definition
- C Language Keywords List & Examples
- C Keywords के Rules
- Reserved Words in C
- Practical Examples & Use Cases
- Best Practices & Tips
- MCQ Practice Section
- FAQs
Introduction – C में Keywords क्यों ज़रूरी हैं?
C Programming सीखते समय सबसे पहले यह समझना ज़रूरी है कि Keywords in C क्या होते हैं। Keywords वह reserved words होते हैं जिनका meaning predefined होता है। ये words programming logic को समझाने और compiler को instructions देने के लिए प्रयोग किए जाते हैं।
C में Keywords की Definition
C में कीवर्ड्स (C Language Keywords) predefined words हैं जिन्हें आप अपने program में variable, function या किसी अन्य user-defined नाम के रूप में इस्तेमाल नहीं कर सकते। ये compiler के लिए special instructions होते हैं। उदाहरण के लिए: int, return, if, for आदि।
📋 C Language में Total कितने Keywords होते हैं?
ANSI C standard के अनुसार C Language में कुल 32 Keywords होते हैं।
| Category | Keywords |
|---|---|
| Data Types | int, float, double, char, void |
| Storage Classes | auto, register, static, extern |
| Control Statements | if, else, switch, case, default |
| Loops | for, while, do, break, continue |
| Others | return, sizeof, typedef, const, volatile |
🔍 C Keywords को Categories में समझें
- Data Type Keywords – int, char, float
- Control Keywords – if, else, switch
- Loop Keywords – for, while, do
- Storage Class Keywords – static, extern
- Jump Keywords – break, continue, return
⚔️ Keywords vs Identifiers (Difference)
| Keywords | Identifiers |
|---|---|
| Reserved words | User-defined names |
| Predefined meaning | User gives meaning |
| Cannot be changed | Can be changed |
| Example: int, if | Example: totalMarks |
C Keywords के Rules
- Keywords reserved होते हैं और इन्हें re-define नहीं किया जा सकता।
- Case-sensitive होते हैं:
Intऔरintअलग हैं। - Identifiers के रूप में keywords का use नहीं कर सकते।
- Program में fixed position और syntax के अनुसार use करना चाहिए।
Reserved Words in C
C में keywords को reserved words भी कहते हैं। इसका मतलब है कि programmer इनके नामों को variables, function या किसी और purpose के लिए नहीं ले सकता। यह compiler के correct execution के लिए जरूरी है।
Practical Examples & Use Cases
नीचे कुछ real-life examples दिए गए हैं जिनसे समझा जा सकता है कि Keywords कैसे काम करते हैं:
#include <stdio.h>
int main() {
int totalMarks = 100; // int keyword used for integer variable
if(totalMarks > 50) {
printf("Pass");
} else {
printf("Fail");
}
return 0; // return keyword
}
Best Practices & Tips
- Keywords को हमेशा lowercase में लिखें।
- Identifiers और keywords के बीच कोई confusion न हो।
- Program readability बढ़ाने के लिए meaningful variable names का use करें।
Best Practices & Tips
- Keywords हमेशा lowercase में लिखें।
- Identifiers और keywords में confusion न होने दें।
- Meaningful variable names का use करें।
- Program readability और maintenance के लिए keywords का सही use करें।
- Keywords को समझकर ही program लिखें।
❌ Beginners द्वारा की जाने वाली Common Mistakes
- Keyword को variable name बना देना
- Capital letters में keyword लिखना (Int)
- Keyword का spelling गलत लिखना
- Keyword का misuse करना
MCQ Practice Section
- Q1: C में कौन सा keyword data type declare करता है?
Options: a) if b) int c) for d) return
Answer: b) int - Q2: C keywords case-sensitive हैं या नहीं?
Answer: Yes - Q3: कौन सा keyword loop control के लिए use होता है?
Answer: for, while, do - Q4: क्या keywords को variable name बनाया जा सकता है?
Answer: No - Q5: function से value return करने के लिए कौन सा keyword use होता है?
Answer: return -
Q6: निम्न में से कौन सा C keyword नहीं है?
a) static b) include c) return d) auto
Answer: b) include
👉C Language Keywords programming की foundation होते हैं। अगर keywords clear हैं,
तो C सीखना आसान और error-free बन जाता है।
📌 Further reading
- C Language Introduction: Beginners के लिए आसान और साफ़ समझ
- C Language में Identifiers क्या होते हैं? आसान भाषा में पूरी जानकारी
- C Program Compile कैसे होता है? Behind the Scenes पूरी प्रक्रिया
🧑💻 About the Author
Anurag Rai एक टेक ब्लॉगर और नेटवर्किंग विशेषज्ञ हैं जो Accounting, AI, Game, इंटरनेट सुरक्षा और डिजिटल तकनीक पर गहराई से लिखते हैं।
Post a Comment
Blogger FacebookYour Comment Will be Show after Approval , Thanks