The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+17 votes
806 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
asked in Programming by Veteran (69k points) | 806 views

For some additional information please refer my comment on https://gateoverflow.in/3273/gate2008-it-13.

4 Answers

+9 votes
Best answer
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

answered by Veteran (15.3k points)
edited by
Can you explain about the options?
This should be the best answer ....
+9 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

answered by Loyal (3.6k points)
+8 votes

D should be the answer.

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

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.

thanks for your help...
@Arjun please add few lines regarding each option in a new answer
@Arjun sir.Please explain
+4 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
 

answered by Boss (8.4k points)


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

33,646 questions
40,193 answers
114,178 comments
38,666 users