retagged by
7,124 views
26 votes
26 votes

Choose the best matching between the programming styles in Group 1 and their characteristics in Group 2.$$\begin{array}{|ll|ll|}\hline \rlap{\textbf{Group 1}} &  & \rlap{\textbf{Group 2}} \\\hline P. & \text{Functional} & 1. & \text{Common-based, procedural} \\ Q. & \text{Logic} & 2. & \text{Imperative, abstract data types} \\ R. & \text{Object-oriented} & 3. & \text{Side-effect free, declarative, expression evaluations} \\ S. & \text{Imperative} & 4. & \text{Declarative, clausal representation, theorem proving} \\\hline \end{array}$$

  1. $P-2\quad  Q-3\quad R-4\quad S-1$
  2. $P-4\quad Q-3 \quad R-2\quad S-1$
  3. $P-3\quad Q-4 \quad R-1\quad S-2$
  4. $P-3\quad Q-4\quad R-2\quad S-1$
retagged by

5 Answers

Best answer
22 votes
22 votes

Answer: (D) P-3 Q-4 R-2 S-1 $$\begin{array}{|ll|ll|}\hline \rlap{\textbf{Group 1}} &  & \rlap{\textbf{Group 2}} \\\hline P. & \text{Functional} & 3. & \text{Side-effect free, declarative, expression evaluations} \\ Q. & \text{Logic} & 4. & \text{Declarative, clausal representation, theorem proving} \\ R. & \text{Object-oriented} & 2. & \text{Imperative, abstract data types} \\ S. & \text{Imperative} & 1. & \text{Common-based, procedural} \\\hline \end{array}$$
Explanation:

P: Functional Programming is declarative in nature, involves expression evaluation, & side effect free.
Q: Logic is also declarative but involves theorem proving.
R: Object-oriented is an imperative statement based & have abstract (general) data types.
S: Imperative programs are made giving commands & follows definite procedure & sequence

Ref: https://www.geeksforgeeks.org/gate-gate-cs-2004-question-90/

edited by
11 votes
11 votes

Functional programming, is declarative, and has no side effects. Hence P - 3.

Logic programming is theorem proving. Hence Q - 4.

Object oriented programming contains abstract data types (Abstraction is one of the properties) and is imperative. Hence R - 2.

Finally option S - 1.

Hence answer is D

9 votes
9 votes

D should be the answer.

5 votes
5 votes

Explanation: P: Functional Programming is declarative in nature, involves
expression evaluation, & side effect free.
Q: Logic is also declarative but involves theorem proving.
R: Object oriented is imperative statement based & have abstract
(general) data types.
S: Imperative: The programs are made giving commands & follows
definite procedure & sequence
 

Answer:

Related questions

9.1k
views
2 answers
24 votes
Kathleen asked Sep 18, 2014
9,137 views
The goal of structured programming is to:have well indented programsbe able to infer the flow of control from the compiled codebe able to infer the flow of control from t...
12.5k
views
3 answers
13 votes
Kathleen asked Sep 22, 2014
12,511 views
A common property of logic programming languages and functional languages is:both are procedural languages both are based on $\lambda$-calculusboth are declarativeboth us...
12.4k
views
5 answers
32 votes
Kathleen asked Sep 18, 2014
12,431 views
Consider the following program fragment for reversing the digits in a given integer to obtain a new integer.Let $n = d_1\, d_2\, \ldots\, d_m$.int n, rev; rev = 0; while(...
5.8k
views
2 answers
12 votes
Ishrat Jahan asked Oct 27, 2014
5,778 views
Match the programming paradigms and languages given in the following table. Paradigms Languages(I)Imperative(a)Prolog(II)Object Oriented(b)Lisp(III)Functional(c)C, Fortra...