There are basically four programming paradigms in programming languages:
1) Imperative programming languages
2) Functional programming languages
3) Logic programming languages
4) Object-oriented programming languages
5) Event-Driven programming languages
6) Concurrent / parallel programming languages
7) Special purpose programming languages
1) Imperative programming languages:
It is also known as procedural languages.
An imperative language uses a sequence of statements to determine how to reach a certain goal. Means here you will get the answer how to do a task not what to do.
For example in C,
int a = 4;
int b = 5;
int sum = 0;
sum = a + b;
From assigning values to each variable to the final addition of those values,each statement changes the state of the program. Using a sequence of five statements the program shows how to add the numbers 4 and 15.
Example of Imperative language is: C, C++
2) Functional programming languages:
It is also known as applicative languages.
Functional programming is a form of declarative programming (mathematical function).
Programming consists of building the function that computes the answer.
There are two types:
- Pure Functional languages: It supports only functional paradigm. Ex. Haskell.
- Impure Functional languages: It supports both functional and imperative paradigm. Ex. Lisp.
Example of Functional language is: Lisp, Python, Haskell.
3) Logic programming languages:
This type of languages concentrate on what is the expected outcome for the program instead of how the outcome is achieved.
Logical programming is something like math .Logic program statements express facts and rules about problems.
To understand the rules, lets take an example like, “A is true if B and C is true”.
And to understand facts we can say that “A is true”.
Example of Logic language is: Prolog.
4) Object-oriented programming languages:
Object oriented programming language based on object instead of just functions and procedures. It involves concepts of oops programming languages.
For example: C++, Java.
5) Event Driven programming languages:
These languages are execute various operations based on user activities like mouse click and other events.
For example: Visual Basic, Java.
6) Concurrent or Parallel programming languages:
These are used to build various distributed programs.
For example: SR, Linda.
7) Special purpose programming languages:
These programming languages are used for special task.
For example: SQL, HTML.