हिंदी माध्यम नोट्स
Categories: C Language in hindi
Program Design Module in c language in hindi , प्रोग्राम डिजाईन मोडुँल c कंप्यूटर भाषा हिंदी में
प्रोग्राम डिजाईन मोडुँल c कंप्यूटर भाषा हिंदी में Program Design Module in c language in hindi :-
प्रोग्राम design किसी good प्रोग्राम का फाउंडेशन होता है |लिए program design किसी प्रोग्राम के डेवलपमेंट मे अहम् भूमिका होती है |किसी प्रोग्राम के code को लिखने से पहले ,प्रोग्राम के सभी aspects को कंसीडर कर लेना चाहिए |
प्रोग्राम design basically प्रोग्राम को develop करने के लिए strategy को use करता है |इसमें चार process मुख्य होते है :-
1. Problem Analysis
किसी भी प्रॉब्लम के solution के लिए प्रोसीजर को ढूढने से पहले ,प्रॉब्लम को समजना होता है |जैसे प्रॉब्लम का nature और प्रॉब्लम क्या करना चाहता है |बिना किसी problem definition के बनाया गया code का आउटपुट hit और miss ओउपुत देता है |प्रोग्राम को design करने से पहले निन्म factors को consider करना चाहिए :-
1.Nature of input
2.Nature of Output
3.Types of condition और constraints
Program Structure
एक बार input और output के types को समजने के बाद ,प्रोग्राम के structure को decide करना होता है |Program structure दो प्रकार के होते है :-
1.TOP -DOWN : इस structure मे , किसी प्रोग्राम को छोटे छोटे भागो मे बाट दिया जाता है |इस छोटे छोटे भागो (subprogram) को read / write करना बहुत ही easy होता है |इस main function /high level function को structure के start मे लिखा जाता है जिससे की इस block मे लिखे बाकि के subprogram को call किया जाता है |
2.Bottom -Top :इस structure मे , किसी प्रोग्राम को छोटे छोटे भागो मे बाट दिया जाता है |इस छोटे छोटे भागो (subprogram) को read / write करना बहुत ही easy होता है |इस main function /high level function को structure के end मे लिखा जाता है |और subprogram को प्रोग्राम के start मे लिखा जाता है |
Algorithm Development
जब हम input/output और प्रोग्राम के structure को decide कर लेते है उसके बाद हम प्रोग्राम मे execute होने वाले statements /task को decide कर लेते है |किसी प्रोग्राम के step by step procedure को algorithm कहते है |algorithm को define करने के लिए सबसे common तरीका ‘flowchart’ होता है |इसके अलावा pusedo code भी होता है |flowchart मे प्रोग्राम के steps को picture मे show किया जाता है |और pusedo code मे , statement मे प्रोग्राम के लॉजिक को define किया जाता है |
algorithm किसी प्रोग्राम को efficient के लिए important फैक्टर है इसलिए हमे किसी प्रोग्रम्म को बन्ने से पहले algorithm को काफी अची तरह से समज लेना चाहिए |
Control structure
किसी complex प्रोग्राम के solution मे कई सारे control statements use किया जाते जो की प्रोग्राम के execution को decide करता है |इस प्रकार solution के लिए , go to statement का use complex होता है |अतः किसी algorithm मे इस प्रकार के operation को बताने के लिए तीन तरीके होते है :-
1.Sequence Structure : इस structure मे execution statements one by one set होते है |
2.Selection Structure : इस structure मे ,किसी condition को सही होने पर block of statement को perform करना होता है |
3.Looping Structure : इस structure मे , किसी block को बार बार repeat करना होता है |इसके लिए while loop, for loop ,Do-while loop की जरुरत होती है |
कोई well designed program के benefit होते है :-
1.Coding is easy and error less
2.Easy maintenance
3.Documentation Easy
4.progress of program can be control smoothly.
5.Easy Testing
Program Coding
algorithm को प्रोग्राम मे translate करने की प्रोसेस को Program Coding कहते है |किसी प्रोग्राम को लिखने से पहले हमे दो aspect को ध्यान मे रखना चाहिए |
(i) machine friendly : code मे कोई भी error नहीं होनी चाहिए |
(ii) Human friendly : जब प्रोग्रामर, किसी प्रोग्रामर द्वारा लिखा गया code को easily से पढ़ ले तो इस code हो human friendly कहते है |
किसी code को machine friendly और Human friendly बनाने के लिए निन्म तरीके को अपनाया जाता है :-
1.Internal Documentation
Internal Documentation का मतलब है किसी प्रोग्राम को describe करना |कुछ detail को प्रोग्राम के internal पार्ट मे भी लिखा जाता है |Internal Documentation का दो aspects मुख्य होते है :-variable का selection और use of comment |seletion का मतलब है variable का नाम उसमे assign होने वाली value के keyword पर रखना |उदाहरण के लिए :
area = side *side;
इस उदहारण मे , area =area of square है |और side =side of square है |अगर
a=s*s;
इस satement मे ,a और s को समजना मुश्किल हो जाता है |इसके अलावा comments को use किया जाता है |
1. statements के block को समजाने comments को use करना |
2.blank line की use करना |
3.comments को use उचित प्रकार से करना चाहिए |
Statement of Construction
जैसे की किसी लॉजिक के flow को design procedure मे decide किया जाता है |लेकिन किसी single statement को बनाने के लिए code को use किया जाता है |सभी statement simple होने चाहिए |अतः multiple lines allow होती है लेकिन single statement को single line मे लिखना चाहिए |
उद्धरण के लिए
for(i=0;i<12;i++){ int a;
a=c+d; int f; f=c-d;
printf(“sum=%d”,a); printf(“Difference = %d”,f);
}
उपर लिखा code बहुत ही complex है अगर इसे single statement per line लिखे तो :
for(i=0;i<12;i++)
{
int a;
a=c+d;
int f;
f=c-d;
printf(“sum=%d”,a);
printf(“Difference = %d”,f);
}
किसी statement को बनाने के लिए :
1.Use single statement per line
2.Avoid Nesting of level (High Level)
3.Use simple condition statement
4.Use () carefully
5.Use Space if required ,to improve readability
Input / Output formats
Input or output statement simple होने चाहिए |किसी input और आउटपुट statement को बनाने से पहले निन्म guide lines को ध्यान मे रखना चाहिए |
1.format को simple रखना |
2.end ऑफ़ file को use करना चाहिए |
3.सभी input request को label करना चाहिए |
4.आउटपुट message का use करना चाहिए अगर आउटपुट कोई विशेष हो |
इस सभी प्रोसेस और guide lines को ध्यान मे रख कर ,एक efficient code को बना सकते है |
Recent Posts
Question Tag Definition in english with examples upsc ssc ias state pcs exames important topic
Question Tag Definition • A question tag is a small question at the end of a…
2 weeks ago
Translation in english grammer in hindi examples Step of Translation (अनुवाद के चरण)
Translation 1. Step of Translation (अनुवाद के चरण) • मूल वाक्य का पता करना और उसकी…
2 weeks ago
Report Writing examples in english grammer How to Write Reports explain Exercise
Report Writing • How to Write Reports • Just as no definite rules can be laid down…
2 weeks ago
Letter writing ,types and their examples in english grammer upsc state pcs class 12 10th
Letter writing • Introduction • Letter writing is an intricate task as it demands meticulous attention, still…
2 weeks ago
विश्व के महाद्वीप की भौगोलिक विशेषताएँ continents of the world and their countries in hindi features
continents of the world and their countries in hindi features विश्व के महाद्वीप की भौगोलिक…
2 weeks ago
भारत के वन्य जीव राष्ट्रीय उद्यान list in hin hindi IAS UPSC
भारत के वन्य जीव भारत में जलवायु की दृष्टि से काफी विविधता पाई जाती है,…
2 weeks ago