Computer Science, asked by rosh9nan6agoureshmi, 1 year ago

Difference Between main() in C and C++
What is the difference between main() in C and C++?

Answers

Answered by kvnmurty
1
C language is a procedural programming language.  A program consists of a main  function and other functions.  The data (global) is exposed to all modules and all functions.

C++ is an object oriented programming.  The features of abstraction of real life data into objects and classes, inheritance by objects from parent classes, data protection from other classes and objects etc. are available.  Polymorphism allows defining many functions with the same name but with different parameters or return type.

In C++ the data and functions are invoked wrt an object.
Similar questions