PPL: Programming Paradigm

PROGRAMMING PARADIGMS:

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 

Others are:

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:
  1. Pure Functional languages: It supports only functional paradigm. Ex. Haskell.
  2. 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.

MCQs:

Q1. Which of the following is not a programming paradigm style? 
a) Functional paradigm 
b) Imperative paradigm 
c) Procedure paradigm

Q2. Logic paradigm is largely utilized in_______.
a)Artificial Intelligence
b)IOT
c)Web Development

Q3. In object-oriented, everything is represented as an______.
a)Functions
b)Objects
c)constructor

Q4. Popular functional programming languages are______.
a) Python
b) Lisp
c) C++

Q5. The 'first do this, next do that' is a short phrase for describing which style of programming paradigm?
a) Imperative
b) Functional
c) Logic

Q6. We can simply define programming paradigm as______
a) A programming language
b) A process
c) A classifying style of a programming language

Q7. While the functional paradigm emphasizes the idea of a mathematical function, the logic paradigm focusses on which of the following?
a) Objects
b) Classes
c) Predicate logic

Q8.  Which of the following is not a characteristic of object oriented programming paradigm?
a) Abstraction
b) Inheritance
c) Subprogram

Q9. The Functional programming paradigm is mainly used to perform mathematical functions without changing_______
a) State
b) Function
c) Program

Q10. What is the second name of imperative programming Paradigm?
a) Procedural Paradigm
b) Functional Paradigm
c) Object Oriented Paradigm

MCQs Answers:

Q1. (c)
Q2. (a)
Q3. (b)
Q4. (c)
Q5. (a)
Q6. (c)
Q7. (c)
Q8. (c)
Q9. (a)
Q10. (a)

Principles of Programming Languages

EasyExamNotes.com covered following topics in PPL.

Practicals:
Previous years solved papers:
A list of Video lectures
References:
  1. Sebesta,”Concept of programming Language”, Pearson Edu 
  2. Louden, “Programming Languages: Principles & Practices” , Cengage Learning 
  3. Tucker, “Programming Languages: Principles and paradigms “, Tata McGraw –Hill. 
  4. E Horowitz, "Programming Languages", 2nd Edition, Addison Wesley

Python Programming ↓ 👆
Java Programming ↓ 👆
JAVA EasyExamNotes.com covered following topics in these notes.
JAVA Programs
Principles of Programming Languages ↓ 👆
Principles of Programming Languages
EasyExamNotes.com covered following topics in these notes.

Practicals:
Previous years solved papers:
A list of Video lectures References:
  1. Sebesta,”Concept of programming Language”, Pearson Edu 
  2. Louden, “Programming Languages: Principles & Practices” , Cengage Learning 
  3. Tucker, “Programming Languages: Principles and paradigms “, Tata McGraw –Hill. 
  4. E Horowitz, "Programming Languages", 2nd Edition, Addison Wesley

    Computer Organization and Architecture ↓ 👆

    Computer Organization and Architecture 

    EasyExamNotes.com covered following topics in these notes.

    1. Structure of desktop computers
    2. Logic gates
    3. Register organization
    4. Bus structure
    5. Addressing modes
    6. Register transfer language
    7. Direct mapping numericals
    8. Register in Assembly Language Programming
    9. Arrays in Assembly Language Programming

    References:

    1. William stalling ,“Computer Architecture and Organization” PHI
    2. Morris Mano , “Computer System Organization ”PHI

    Computer Network ↓ 👆
    Computer Network

    EasyExamNotes.com covered following topics in these notes.
    1. Data Link Layer
    2. Framing
    3. Byte count framing method
    4. Flag bytes with byte stuffing framing method
    5. Flag bits with bit stuffing framing method
    6. Physical layer coding violations framing method
    7. Error control in data link layer
    8. Stop and Wait scheme
    9. Sliding Window Protocol
    10. One bit sliding window protocol
    11. A protocol Using Go-Back-N
    12. Selective repeat protocol
    13. Application layer
    References:
    1. Andrew S. Tanenbaum, David J. Wetherall, “Computer Networks” Pearson Education.
    2. Douglas E Comer, “Internetworking with TCP/IP Principles, Protocols, And Architecture",Pearson Education
    3. KavehPahlavan, Prashant Krishnamurthy, “Networking Fundamentals”, Wiley Publication.
    4. Ying-Dar Lin, Ren-Hung Hwang, Fred Baker, “Computer Networks: An Open Source Approach”, McGraw Hill.