what is the main difference between c and c++?
Answer Posted / boopathi
History of C Language
The C programming language was designed by Dennies Ritchie
in the early 1970s at Bell Laboratories. It was first used
system implementation language for the nascent Unix
operating system. The main reason to devised C was to
overcome the limitations of B. It was Derived from the
type-less language BCPL ((Basic Combined Programming
Language). C was was the evolution of B and BCPL by
incorporating type checking. It was originally intended for
use in writing compilers for other languages.
History of C++
C++ was devised by Bjarne Stroustrup in 1983 at Bell
Laboratories. It is an extension of C by adding some
enhancements to C language. Bjarne combined the simula's(a
language designed for making simulations, created by
Ole-Johan Dahl and Kristen Nygaard) features of object
oriented and the efficiency of C. The new features added to
language are templates, namespaces, exception handling and
use of standary library.
Difference between c and c++
C++ is an extension of C language. This means that you can
not only use the new features introduced with C++ but can
also use the power and efficiency of C language. C and C++
are no more language for writing compilers and other
languages, these general purpose languages are used
worldwide in every field.
Here is a list of differences between c and c++.
The main difference between C and C++ is that C++ is object
oriented while C is function or procedure oriented. Object
oriented programming paradigm is focused on writing programs
that are more readable and maintainable. It also helps the
reuse of code by packaging a group of similar objects or
using the concept of component programming model. It helps
thinking in a logical way by using the concept of real world
concepts of objects, inheritance and polymorphism. It should
be noted that there are also some drawbacks of such
features. For example using polymorphism in a program can
slow down the performance of that program.
On the other hand, functional and procedural programming
focus primarily on the actions and events, and the
programming model focuses on the logical assertions that
trigger execution of program code.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is overriding in oop?
What is the advantage of oop over procedural language?
Prepare me a program for the animation of train
#include
Write a program to reverse a string using recursive function?
Why polymorphism is used in oops?
to find out the minimum of two integer number of two different classes using friend function
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?
When not to use object oriented programming?
What is abstraction encapsulation?
Why do we need polymorphism in c#?
What is pointer in oop?
Which is better struts or spring?
What is an advantage of polymorphism?
What is polymorphism and types?