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

Answer Posted / krishnendu dey

1.C doesn't support function overloading but c++ does
2.c++ has a features of NAMESPACE which C doesn't have.
3.In C++ we can use function inside structure whereas C
doesn't permit this.
4 c- function driven
C++- object driven
5. C uses top down approach
C++ uses bottom down aproach

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to call a non virtual function in the derived class by using base class pointer

5253


Can a destructor be called directly?

599


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 does and I oop and sksksk mean?

649


What is polymorphism used for?

566






What is oops and why we use oops?

569


Can bst contain duplicates?

664


What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }

1979


What are main features of oop?

629


What are the 4 pillars of oop?

667


What are the advantages of polymorphism?

573


What is polymorphism and its types?

591


What is meant by multiple inheritance?

736


Can abstract class have normal methods?

610


What is the highest level of cohesion?

575