- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference between C and C++.
C programming Language
C is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell Labs. C was originally first implemented on the DEC PDP-11 computer in 1972.
In 1978, Brian Kernighan and Dennis Ritchie produced the first publicly available description of C, now known as the K&R standard.
The UNIX operating system, the C compiler, and essentially all UNIX application programs have been written in C. C has now become a widely used professional language for various reasons −
- Easy to learn
- Structured language
- It produces efficient programs
- It can handle low-level activities
- It can be compiled on a variety of computer platforms
C++ programming Language
C++ is a statically typed, compiled, general-purpose, case-sensitive, free-form programming language that supports procedural, object-oriented, and generic programming.
C++ is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features.
C++ was developed by Bjarne Stroustrup starting in 1979 at Bell Labs in Murray Hill, New Jersey, as an enhancement to the C language and originally named C with Classes but later it was renamed C++ in 1983.
C++ is a superset of C, and that virtually any legal C program is a legal C++ program.
Note − A programming language is said to use static typing when type checking is performed during compile-time as opposed to run-time.
C++ fully supports object-oriented programming, including the four pillars of object-oriented development −
- Data hiding
Following are the important differences between C and C++.
|C developed by Dennis Richie between 1969-1973 at AT&T Bell Labs.
|C++ developed by Bjarne Stroustrup in 1979.
|C does not support OOPS concepts like polymorphism, encapsulation, and inheritance.
|C++ is a object oriented programming and supports OOPS concepts like polymorphism, encapsulation, and inheritance.
|C is a subset of C++.
|C++ is superset of C. All code of C can run in C++ but vice versa may or may not be true.
|C has 32 keywords.
|C++ has 52 keywords.
|Procedural vs OOPS
|C is a procedural programming language.
|C++ supports both procedural as well as object oriented programming.
|Data and Function
|Data and Functions are separate in C.
|GData and Functions are encapsulated together as object in C++.
|Information Hiding is not supported in C.
|Information Hiding is supported in C++ via encapsulation.
|Function and Operator overloading is not supported in C.
|Function and Operator overloading is supported in C++.
|C is function driven language.
|C++ is Object driven language.
|C structure do not support defining functions.
|C++ Structure supports defining function.
|Reference Variables are not supported in C.
|Reference Variables are supported in C++.
|Virtual and friend functions
|Virtual and friend functions are not supported in C.
|Virtual and friend functions are supported in C++.
|Exception handling is not supported in C.
|Exception handling is supported in C++.
Kickstart Your Career
Get certified by completing the courseGet Started