Question:

Which one is non-procedural language ?

Show Hint

Think of it as giving instructions: a procedural language is like giving someone a recipe with step-by-step instructions. A non-procedural language is like ordering a dish from a menu—you say what you want, not how to cook it.
  • C
  • SQL
  • Java
  • C++
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: Differentiate between procedural and non-procedural languages.

Procedural languages (like C, Java, C++) require the programmer to specify a step-by-step sequence of operations (the "how") to achieve a result.
Non-procedural (or declarative) languages require the programmer to specify the desired result (the "what") without detailing the steps to get there.

Step 2: Classify the given languages.

(A) C, (C) Java, and (D) C++ are all procedural or object-oriented languages where you write explicit instructions.
(B) SQL (Structured Query Language) is a declarative language. You declare the data you want to retrieve (e.g., `SELECT name FROM users WHERE age>18`), and the database engine figures out the procedure to get it.
Therefore, SQL is a non-procedural language.
Was this answer helpful?
0
0