The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+19 votes
1.4k 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$
in Programming by Veteran (52.1k points)
edited by | 1.4k views
0

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

4 Answers

+12 votes
Best answer

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

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

by Active (1.7k points)
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?
+10 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

by Active (3.5k points)
+9 votes

D should be the answer.

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

by Loyal (9.7k points)
Answer:

Related questions

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
49,830 questions
54,802 answers
189,511 comments
80,751 users