1.6k views

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$

edited | 1.6k views
0

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 The programs are made giving commands & follows definite procedure & sequence

by Active (1.7k points)
edited
0
Can you explain about the options?
+2
This should be the best answer ....
0
Can you please tell me the meaning of 'Imperative' in Group 2's 2 ???what it signify?

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.

by Active (3.6k points)

by Active (1.9k points)
+1
But is abstract data types in imperative languages?
0
i have a vague idea about that.but that was the only option looking fine.
0
okay.. why not D option?
0

i think it's D only then.i was in confusion before answering also.

D because:

oop supports abstraction.

and imperative should be never command based,as where we define how the answer should be achieved.

+1
0
0

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

by Boss (10.2k points)