1.

What do you understand about procedural programming? How is it different from object oriented programming?

Answer»

Procedural programming is a programming model that evolved from structured programming and is BASED on the concept of invoking procedures. Procedures, often known as routines, subroutines, or functions, are essentially a set of instructions to be executed. Any procedure in a PROGRAM can be invoked at any time during execution, either by other procedures or by the program itself.

The following table illustrates the differences between procedural programming and object-oriented programming:

Procedural ProgrammingObject-Oriented Programming
In procedural programming, the program is broken down into little modules known as functions.Object-oriented programming divides a program into discrete pieces called objects.
The top-down technique is used in procedural programming.The bottom-up method is used in object-oriented programming.
It's not straightforward to add new data and functions.It's simple to add additional data and functions.
OVERLOADING is not possible with procedural programming.In object-oriented programming, overloading is possible.
Because procedural programming lacks a proper method for hiding data, it is insecure.Data is hidden in object-oriented programming, making it safer.
In procedural programming, function takes precedence over data.Data is more important than function in object-oriented programming.
C, FORTRAN, Pascal, Basic, and other programming languages are examples.C++, Java, Python, C#, and other programming languages are examples.


Discussion

No Comment Found