Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

c language
general cs
c vs c++

C vs C++

Educative Answers Team
svg viewer

C is a system programming language, developed in 1972 by Dennis Ritchie.

C++ is a general-purpose programming language, developed in 1980 by Bjarne Stroustrup at bell laboratories of AT&T (American Telephone & Telegraph).

Here’s a brief summary of how core functionality differs between these two:

Feature C C++
Programming Paradigms Procedural Procedural and Object Oriented
Level of Abstraction Lowest Low
Execution flow Top to bottom Top to bottom
Form of compiled source code Executable code Executable code
Memory allocation Uses malloc Uses new
Memory deallocation Uses free Uses delete
Print statement scanf() and printf() cin>> and cout<<
String type Character arrays Character arrays and Objects
Exception Handling Use other functions Use Try and Catch block.

Here’s how data types compare:

Data types C C++
Strings No Yes
Boolean Yes Yes
Structs Yes Yes
Classes No Yes

Lastly, C++ also supports some other useful things: Functions in Structures, Function Overloading, Operator Overloading, Inheritance, and Namespace. These don’t exist in C.

Applications of C

  • Operating Systems
  • Development of New Languages
  • Computation Platforms
  • Embedded Systems
  • Graphics and Games

Applications of C++

  • Games
  • Graphic User Interface (GUI) based applications
  • Database Software
  • Medical and Engineering Applications
  • Banking and Trading enterprise Applications
  • Compilers
  • Integrated 3D modeling, Visual Effects, and Animation

Basic Example

The following program prints Hello World in both C and C++ :


int main() {
    printf("Hello World\n");
    return 0;


c language
general cs
c vs c++
Copyright ©2022 Educative, Inc. All rights reserved

View all Courses

Keep Exploring