retagged by
6,900 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

24 votes
24 votes
2 answers
1
Kathleen asked Sep 18, 2014
8,891 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...
13 votes
13 votes
3 answers
2
Kathleen asked Sep 22, 2014
12,351 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...