Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What polymorphism means?

1136


Why multiple inheritance is not possible?

1122


Why do we use encapsulation in oops?

1089


What is the renewal class?

2823


What is object in oop?

1171


Question In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. Question Submitted By :: Sunil Kumar I also faced this Question!! Rank Answer Posted By Re: In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. Answer # 1 use copy constructors 0 Shanthila There is something to be taken care in destructor, in copy constructor, suppose the memory is assigned to the embedded member object pointer with the parameter passed value, but if some other objects of different class also are pointing to this memory, then if some one deletes the object then this class member pointer object will become dangling, or if the object is not deleted properly then there will be memory leak. Please suggest the design change required to handle or avoid this situation

2183


What is polymorphism explain its types?

1220


What is overloading in oops?

1216


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

1425


How can you overcome the diamond problem in inheritance?

1228


What is meant by multiple inheritance?

1337


Get me a number puzzle game-program

2318


what are the different types of qualifier in java?

2321


What is overriding vs overloading?

1112


What is the advantage of oop over procedural language?

1132