Programming paradigms:
Paradigm का अर्थ है किसी चीज़ को कै से करते हैं या कै से करने के बारे में सोचते हैं। Program को organize करने में
आप जो भी approach या सोच का इस्तेमाल करते हैं उसे Paradigm कहा जाता है।
Paradigm means how to do or think about doing something. Whatever approach or thinking you
use in organizing the program is called Paradigm.
Types of Programming paradigms:
1. Procedural programming
2. Modular programming
3. Object oriented programming
Procedural programming:
Procedural language में प्रोग्राम एक list of statements होता है जहाँ प्रत्येक statement कम्प्यूटर से कु छ न कु छ
कार्य करने के लिए कहती है। यहाँ focus processing पर होता है अर्थात algorithm पर होता है जोकि उस कार्य को पूरा
करेगा। अतः procedural programming में यह विचार किया जाता है कि क्या प्रोसीजर किया जाना है तथा उसे करने का
best algorithm क्या है। इस प्रकार की paradigm को support करने वाली languages functions को argument
pass करने की तथा function से value return करने की सुविधा प्रदान करती है।
procedural programming में ज़ोर इस बात पर दिया जाता है कि कै से न कै से समस्या solve हो जाये। यहाँ data
उतना महत्वपूर्ण नहीं होता है जितना कि program महत्वपूर्ण होता है।
A program in procedural language is a list of statements where each statement tells the
computer to do something or the other. Here the focus is on processing, that is, on the algorithm
that will complete that task. Therefore, in procedural programming, it is considered that what is
to be processed and what is the best algorithm to do it. Languages that support this type of
paradigm provide the facility to pass arguments to functions and return values from functions.
In procedural programming, the emphasis is on how or how the problem should be solved. Here
the data is not as important as the program.
Modular programming:
program size बढ़ने पर एक single list of instructions बहुत बड़ी हो जाती है तथा उसे संभालना बहुत मुश्किल हो
जाता है। ऐसे में बड़े प्रोग्राम को छोटे छोटे subprograms (अर्थात functions) में break कर देना modular
programming कहलाता है। programs को कई functions में break कर देने के बाद कई functions को एक group
में रख देना module कहलाता है।
इस programming paradigm को data hiding principal भी कहा जाता है। इसमें programmer पहले सोचता है
कि program को modules में कै से बाँटना है तथा फिर program को partition कर देता है और डाटा modules के अंदर
हिडेन रहता है।
As the program size increases, a single list of instructions becomes very large and becomes
very difficult to handle. In such a situation, breaking a large program into small subprograms
(i.e. functions) is called modular programming. After breaking the programs into several
functions, keeping several functions in one group is called module.
This programming paradigm is also called data hiding principal. In this the programmer first
thinks how to divide the program into modules and then partition the program and the data
remains hidden inside the modules.
Object oriented programming:
Preprocessors: