C vs C++


C is a procedural general purpose programming language developed in the early 1970s. The language focuses on execution speed, simplicity, and memory management. The main use of the C language is in low level programming, such as operating systems or drivers.

C++ is an object oriented general purpose programming language developed in the late 1970s. The language is similar to C, but with new functionalities.

The table below outlines the main differences between C and C++.

CC++
C is a procedural language. C++ is an object-oriented language.
C contains 32 keywords. C++ contains 63 keywords.
.c is the file extension. .cpp is the file extension.
Uses calloc(), malloc(), and free() for memory allocation and deallocation. Uses the new and delete operators for memory allocation and deallocation.
Does not support access modifiers.Supports access modifiers.
No additional security features.Secures code through encapsulation and data hiding.
Code separated into functional blocks. Code separated into object blocks.
No support for inline functions. Supports inline functions.
Suitable for low level programming. Suitable for high-level programming.