GATE / CS ARCHIVE

GATE CSE 2004 / QUESTION 90

Match programming paradigms to descriptions

Engineering Mathematics & Other Topics · Other Computing Topics · Full GATE CSE 2004 paper

GATE 2004, Q90 2 marks · MCQ
Not in GATE 2027 syllabusReport issue

Other Computing Topics

Question 90, GATE 2004: Match styles P=functional, Q=logic, R=object-oriented, S=imperative with characteristics: (1) command-based, procedural; (2) imperative, abstract data types; (3) side-effect-free, declarative, expression evaluation; (4) declarative, clausal representation, theorem proving.
Options:
(A) P-2,Q-3,R-4,S-1
(B) P-4,Q-3,R-2,S-1
(C) P-3,Q-4,R-1,S-2
(D) P-3,Q-4,R-2,S-1
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

1. Functional programming matches side-effect-free declarative expression evaluation (P→3). Logic programming matches declarative clauses and theorem proving (Q→4).

2. In this classification object-oriented programming matches imperative programming with abstract data types (R→2), while imperative programming matches command-based procedural computation (S→1). Thus P-3,Q-4,R-2,S-1 is D.

3. These are textbook paradigm characterizations, not claims that every language implementing a paradigm has only those features.

4. Teaching check: Match the most diagnostic feature first: theorem proving belongs to logic, and expression evaluation without side effects to functional programming. Those two matches fix P and Q, leaving abstract-data-type encapsulation for object orientation and procedural commands for imperative programming.

Original paper, page 12