- C program development life cycle in Hindi
- Program structure in C language Hindi
- C First program in Hindi
Introduction of C Program
C language में कोई भी program create करने के लिए हमे 4 steps को follow करना पड़ता है | इन चारो steps को मिला कर हम एक program develop करते है | और इन्हें हम Program Development Life Cycle कहते है | ये steps एक निश्चित क्रम में होते है | और हर step का अपना एक महत्व होता है।
- Editing
- Compiling
- Linking
- Executable File
Editing
सबसे पहले हम एक program को लिखते है। जो human readable format में होता है। इसे हम program development life cycle का editing part कहते है। जहा पर अपने program को लिखते है |
Compiling
इस step मे अपने program को run करते है | यानी compile करते है | इसे development life cycle का second step कहते है | जहा पर programs के error को find करके उसे remove करते है | ताकि computer इसे process कर सके।
Linking
इसके बाद third step linking process की होती है। यहाँ पर जरूरी libraries को link किया जाता है | नही तो हमारा program execute नही होता है |
Executable File
इस step मे अपने program को run करते है | और program run होने के बाद वह exe file मे convert हो जाता है | जिसे हम executable file कहते है |
Structure of C Program
जब भी हम C language मे coding करने जाते है | तो हमे दो rule को fallow करना पड़ता है | पहला header file include करना और दूसरा तो main() function ही होता है |
अगर हम header file include नही करेंगे तो भी हमारा program नही चलेगा | और अगर हम main() function नही बनायेंगे तो भी हमारा program execute नही होगा |
वैसे तो C language मे header file बहुत सारे है | C program मे stdio.h and conio.h एक header file है | और इन header file को सबसे पहले declare किया जाता है |
C language मे standard input/output header file होती है | जो program में input और output को handle करती है।
header file include करने के बाद हमे main() function बनाना पड़ता है | जहा पर हम statement को लिखते है | और हा एक project मे 2 main() function नही बना सकते है |
Example of C basic program
#include<stdio.h> #include<conio.h> int main() { printf("Hello Viewers"); return 0; }
OUT PUT
Hello Viewers
Commenting
Comment हमारे program में वह text होता है | जिसे execution के time compiler ignore कर देता है। इसका use program को समझने के लिए किया जाता है | क्योकि जब हम code लिखना सुरु करते है | तो बहुत सारे code हो जाते है | और code को समझने मे problem होती है | इसीलिए हम comment का use करते है |ताकि जरुरत पड़ने पर code को analogize कर सके | C language में comments define करने के लिए forward slash ( / ) और asterisk ( * ) का प्रयोग किया जाता है।
/* Your comment here */
Example
#include<stdio.h> #include<conio.h> int main() { /* Your comment here */ printf("this is a comment"); /* Your comment here */ return 0; }
OUT PUT
this is a comment
C – Flow Chart | C – Operators |
Previous | Next |
---|