Skip to content
Official PYQ · 2005

GATE CS 2005 Q3 — Programming in C

Explain with AI

A common property of logic programming languages and functional languages is:

Choose one option
View worked solution

Answer: C

The correct option is C.

Programming paradigms are broadly classified into imperative (procedural) and declarative paradigms:

  • Declarative Programming: Focuses on what the program should accomplish rather than how to achieve it. It expresses the logic of a computation without describing its control flow. Both functional programming (e.g., Haskell, Lisp) and logic programming (e.g., Prolog) are major sub-paradigms of declarative programming.

Let us analyze why the other options are incorrect:

  • Option A: Procedural languages (like C or Pascal) specify explicit step-by-step execution flows. Both functional and logic languages avoid this, making them non-procedural.
  • Option B: Functional programming is mathematically based on λ\lambda-calculus, whereas logic programming is based on first-order predicate logic.
  • Option D: Horn clauses form the logical basis of logic programming (such as Prolog), but they are not used in functional programming.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Programming in C questions