
- C++ Basics
- C++ Home
- C++ Overview
- C++ Environment Setup
- C++ Basic Syntax
- C++ Comments
- C++ Data Types
- C++ Variable Types
- C++ Variable Scope
- C++ Constants/Literals
- C++ Modifier Types
- C++ Storage Classes
- C++ Operators
- C++ Loop Types
- C++ Decision Making
- C++ Functions
- C++ Numbers
- C++ Arrays
- C++ Strings
- C++ Pointers
- C++ References
- C++ Date & Time
- C++ Basic Input/Output
- C++ Data Structures
- C++ Object Oriented
- C++ Classes & Objects
- C++ Inheritance
- C++ Overloading
- C++ Polymorphism
- C++ Abstraction
- C++ Encapsulation
- C++ Interfaces
What is the difference Between C and C++?
Following are some of the differences between C and C++.
- When compared to C++, C is a subset of C++. All valid C programs are valid C++ programs.
- C is a structural or procedural programming language, while C++ is an object oriented programming language.
- In C, Functions are the fundamental building blocks, while in C++, Objects are the fundamental building blocks.
- C doesn't have variable references, while C++ has variable references.
- C uses malloc and free for memory allocation while C++ uses new and delete for memory allocation.
- C does not provide direct support for error handling, while C++ supports exception handling that helps in error detection and smooth handling.
- C does not support function and operator overloading, while C++ supports both function and operator overloading.
- C doesn't support Generic programming, while templates in C++ allow to write generic programs.
- C doesn't support namespaces while C++ supports them.
- Related Articles
- What is the difference between JavaScript and C++?
- What is the difference between C++0x and C++11?
- What is the difference between | and || operators in c#?
- What is the difference between printf() and cout in C++?
- What is the difference between size_t and int in C++?
- What is the difference between static_cast and C style casting?
- What is the difference between Task.WhenAll() and Task.WaitAll() in C#?
- What is the difference between Monitor and Lock in C#?
- What is the difference between ++i and i++ in c?
- What is the difference between ++i and i++ in C++?
- What is the difference between literal and constant in C++?
- What is the difference between overriding and shadowing in C#?
- What is the difference between String and string in C#?
- What is the difference between literal and constant in C#?
- What is the difference between declaration and definition in C#?

Advertisements