A procedural language is a programming language that follows instructions in a sequential manner. Consider the example below:
Go to the market
Buy vegetables
Pay water and electricity bills
Go home
In a procedural language the above instructions will have to be done from the top to the bottom. If one instruction is not carried out the other instructions below it will not be executed.
The above languages listed above are considered procedural because of the manner in which they execute when they are run. Consider one example in C programming:
#include <stdio.h>
int main()
{
int num1 = 5;
int num2 = 10;
int sum = num1 + num2;
printf("%d + %d = %d", num1, num2, sum);
return (0);
}
/* Output */
// 5 + 10 = 15
As we can see the execution goes from top to bottom. In the event that one instruction is wrong the execution is halted and an error occurs in procedural languages if the error isn't handled.
Considering the above pros and cons is important as you develop projects.