C vs C++

May 22, 2023

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.

Anastazija
Spasojevic
Anastazija is an experienced content writer with knowledge and passion for cloud computing, information technology, and online security. At phoenixNAP, she focuses on answering burning questions about ensuring data robustness and security for all participants in the digital landscape.