Programming paradigms: Which statement below is <em>not</em> true about nonprocedural (declarative) languages?

Difficulty: Easy

Correct Answer: BASIC is an example of a nonprocedural language.

Explanation:


Introduction / Context:
Programming languages are often grouped as procedural (imperative) and nonprocedural (declarative). Nonprocedural languages describe what result is desired rather than specifying the exact control flow to achieve it. This question tests recognition of that distinction.


Given Data / Assumptions:

  • Nonprocedural examples include SQL and many rule-based or logic languages.
  • Procedural examples include C, Java, and BASIC.
  • We look for the statement that is not true about nonprocedural languages.


Concept / Approach:
Nonprocedural languages allow users to declare goals or constraints and rely on the language runtime or engine to determine execution steps. Procedural languages require explicit step-by-step instructions. BASIC is a classic procedural language, so labeling it nonprocedural is incorrect.


Step-by-Step Solution:
Identify the essence of nonprocedural languages: specify “what,” not “how.”Assess each option against this definition.Recognize BASIC as procedural; therefore, option about BASIC being nonprocedural is false.


Verification / Alternative check:
SQL (a declarative language) illustrates the nonprocedural paradigm: SELECT conditions state desired records; the optimizer chooses the execution plan.


Why Other Options Are Wrong:

  • English-like/user-friendly: Many nonprocedural languages use high-level, readable constructs.
  • “All of the above are true”: Cannot be true because the BASIC statement is false.
  • “None of the above is true”: Also false because several statements are true.


Common Pitfalls:
Equating “user-friendly” with “nonprocedural”; a procedural language can also be user-friendly, but the key is whether it dictates control flow.


Final Answer:
BASIC is an example of a nonprocedural language.

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion