0% found this document useful (0 votes)
5 views2 pages

03 Programming Paradigm

The document outlines various programming paradigms including Structured, Procedural, Functional, Object-oriented, Logic, and Concurrent programming. Each paradigm is defined with its characteristics, examples, and key concepts, such as the use of sequences, procedures, functions, objects, logical sentences, and threads. The document provides a foundational understanding of how different programming approaches operate and their applications.

Uploaded by

p25neeharika
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

03 Programming Paradigm

The document outlines various programming paradigms including Structured, Procedural, Functional, Object-oriented, Logic, and Concurrent programming. Each paradigm is defined with its characteristics, examples, and key concepts, such as the use of sequences, procedures, functions, objects, logical sentences, and threads. The document provides a foundational understanding of how different programming approaches operate and their applications.

Uploaded by

p25neeharika
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Different Programming Paradigms:

1. Structured Programming Language:

It is a programming model in which the program is made up of a single structure where the code
is executed the instruction by instruction one after another. Therefore, the instructions in this
approach will be executed in a serial and structured manner. e.g. C

The structured program mainly consists of three types of elements:

-Sequence Statements e.g. Flow in the codes are from one statement to the next statement.

-Selection Statements . eg. if <condion>

Statements1

else

Statements2

-Iteration Statements. e.g. for loop, while loop for repetition of tasks

2. Procedural Programming Language:

Procedural Programming is a programming paradigm which is derived from structured


programming which uses multiple variables, heavy loops and other elements and used to execute
a sequence of statements which lead to a result. Procedures are the routines, subroutines or
functions which consist of a series of computational steps. e.g. C

3. Functional Programming Language:

Functional programming is based on mathematical functions. The Functional Programming


paradigm views all subprograms as functions in the mathematical sense. They take in arguments
and return a single solution. The solution returned is based entirely on the input, and the time at
which a function is called has no relevance. e.g. Lisp, Python.

4. Object-oriented Programming Language:

Object Oriented Programming (OOP) is a paradigm in which real-world objects are viewed as
separate entities having their own state which is modified only by built in procedures, called
methods. The object-oriented paradigm provides key benefits of reusable code and code
extensibility. e.g. C++, Java

e.g. Vehicle is the class

Maruti Alto 800, Honda City, Hyundai i20 are the objects.
Each object has its state like Color, Weight, Price, Engine number etc.

On each object, we can perform operations as methods like Apply brake, clutch, turning
Steering wheel etc.

5. Logic Programming Language:

A logic programming language is a set of sentences in a logical form expressing some facts and
rules about some problem. The queries are made. e.g. Prolog

e.g.

John is father of Lily

Kathy is mother of Lily

Lily is mother of Bill

Ken is father of Karen

In Prolog, we write the following for the given facts:

father(john,lily).

mother(kathy,lily).

mother(lily,bill).

father(ken, karen).

6. Concurrent Programming: In a concurrent program, several streams of operations may


execute concurrently. Each stream of operations executes as it would in a sequential
program except for the fact that streams can communicate and interfere with one another. Each
such sequence of instructions is called a thread. e.g. Java

You might also like