Page 7 - Difference Between C and C++
P. 7

C                                                                c++












              C does not support                                       C++ supports reference

              reference variables.                                       variables.



             C                                                         C++

              provides malloc() and callo                                provides new operator for

              c()functions for dynamic                                   memory allocation


              memory allocation,                                         and delete operator for

              and free() for memory Re-                                  memory Re-allocation.

              allocation.
                                                                        C++ provides support for


             C does not provide direct                                  exception handling.

              support for error handling                                 Exceptions are used for

              (also called exception                                     "hard" errors that make the

              handling)                                                  code incorrect.
   2   3   4   5   6   7   8