1.2k views

Choose the best matching between the programming styles in Group 1 and their characteristics in Group 2.

 Group 1 Group 2 P. Functional Q. Logic R. Object-oriented S. Imperative 1. Common-based, procedural 2. Imperative, abstract data types 3. Side-effect free, declarative, expression evaluations 4. Declarative, clausal representation, theorem proving
1. P-2 Q-3 R-4 S-1
2. P-4 Q-3 R-2 S-1
3. P-3 Q-4 R-1 S-2
4. P-3 Q-4 R-2 S-1
0

Answer: (D) P-3 Q-4 R-2 S-1

 P. Functional 3. Side-effect free, declarative, expression evaluations Q. Logic 4. Declarative, clausal representation, theorem proving R. Object oriented 2. Imperative, abstract data types S. Imperative 1. Common-based, procedural

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

edited by
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.

+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

1
2