1.

Compare And Contrast C And C++.?

Answer»

Comparison: C++ is an extension to the C language. When C++ is used as a procedural language, there are only MINOR SYNTACTICAL differences between them.

Contrast: When used as a procedural language, C++ is a better C because:

  • It vigorously enforces data typing conventions.
  • It allows variables to be defined where they are used.
  • It allows the definition of real (semantically significant) constants.
  • It allows for automatic pointer dereferencing.
  • It supports call-by-reference in addition to call-by-value in FUNCTIONS.
  • It supports tentative variable declarations (when the type and LOCATION of a variable cannot be known before hand.

As an object oriented language, C++ introduces much of the OOP paradigm while allowing a mixture of OOP and procedural styles.

Comparison: C++ is an extension to the C language. When C++ is used as a procedural language, there are only minor syntactical differences between them.

Contrast: When used as a procedural language, C++ is a better C because:

As an object oriented language, C++ introduces much of the OOP paradigm while allowing a mixture of OOP and procedural styles.



Discussion

No Comment Found