Table of Contents
Back Button
Back to Chapter
C++ Setting Up
C++ Introduction
No items found.
C++ Basics
No items found.
C++ Control Statements
No items found.
C++ Logical Operators
No items found.
C++ Procedural Programming
No items found.
C++ Structural Programming
No items found.
C++ Implementation of OOPS
No items found.
C++ Arrays and Vectors
No items found.
C++ Error Handling
No items found.
C++ File Handling
No items found.

C++ Procedural Programming Paradigm

When you are new to programming, programming paradigms are not of much importance. But with each new concept you learn and start creating complex programs and software, it becomes important to understand  which programming paradigm is best suited for your project.

A paradigm is a set of concepts and practices that constitutes a way of viewing reality for the community in our case the C++ developers or programmers.

The origin of the C++ programing language comes from the C programming language. C provides the basis for the C++ procedural programming paradigm.

Procedural programming involves using variables and functions to create reusable procedures that constitute a full program.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/74423ab6-890f-43ea-b185-ea64c5096922/Untitled_Diagram_(12).png

Procedural Programming may be the first programming paradigm that a new developer will learn. The procedural fundamentally directly instructs a device on how to finish a task in logical steps. This paradigm uses a top-down approach and treats data and functions as two different entities. Procedural Programming divides the program into procedures, which are also known as functions, containing a series of steps to be carried out.

Advantages

  • The coding is easy and simple.
  • The codes have the ability to be reused in several parts of the program.
  • The programming paradigm consumes less memory on the computer.
  • It is easier for tracking the flow of the codes in the program written in the procedural programming paradigm.

Disadvantages

  • Focus is on functions rather than data.
  • In large programs, it is difficult to identify the scope of global data.
  • The use of global data is prone to errors and it could be an obstacle in case of maintenance and enhancements.
  • The modification of global data requires the modification of those functions using it.
  • Maintaining and updating program code is difficult because of global data.
  • The procedural programming does not model the real-world problem very well since functions are action-oriented and do not really correspond to the elements of the problem.