what is the main difference between c and c++?

Answer Posted / vivek goyanr

In C memory allocation is done with malloc statement whereas
in C++ it is done through new keyword.Also memory is
deallocated in C using free statement while in C++
deallocation takes place through delete.

Is This Answer Correct ?    452 Yes 108 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is encapsulation and abstraction? How are they implemented in C++?

635


What is constructor overloading in oop?

601


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.

628


What is encapsulation example?

545


What is solid in oops?

600






Give two or more real cenario of virtual function and vertual object

1851


What is abstraction example?

616


What is an example of genetic polymorphism?

647


Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box

2030


What is the main purpose of inheritance law?

667


Why do we use class in oops?

553


I have One image (means a group photo ) how to split the faces only from the image?............ please send the answer nagadurgaraju@gmail.com thanks in advace...

1622


What is the renewal class?

2161


What is the difference between a mixin and inheritance?

519


What is polymorphism used for?

566