BCA / B.Tech 11 min read

Procedural and Non-Procedural Languages

Procedural and Non-Procedural Languages in C++:


Programming languages are mainly divided into two categories: Procedural and Non-Procedural. Both are used in software development and programming, but there are significant differences in their functionality and the programming style they require.

What is a Procedural Language?
A procedural programming language is one in which a program is executed in a sequence. In these languages, a program is divided into small functions or procedures that are run in a specific order.
Key Features: Sequential execution, functions/procedures, control structures (if-else, for, while), global and local variables.
Examples: C, FORTRAN, Pascal.

What is a Non-Procedural Language?
A non-procedural programming language is one in which the programmer specifies "what to do" but not "how to do it." The execution process is automatic, and the programmer does not need to worry about the procedures.
Key Features: Declarative, lack of control flow, data-centric, and high-level abstraction.
Examples: SQL, Prolog, LISP.

Difference Between Procedural and Non-Procedural Languages:
The main difference lies in the approach: procedural languages are based on a sequence of instructions, while non-procedural languages are based on describing the desired result.