c++ provides classes...and classes do what we want but why
then strcut are used...if we say data hiding... it is also
provided by c++ in structs then why to prefer clasess

Answer Posted / rasagna

resuability is the excellent concept in cpp. we can reuse
the functions many times.but in c we have not that type of
facility. classes gives redability and data security
(because of access specifier)to program. oop(object
oriented program) gives class as high in cpp.because of
inheritance,polymorphism,data independence.encapsulation.


At last what i want to say is

c + extra reatures = c++.
c + class = c++

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why interface is used?

549


to find out the minimum of two integer number of two different classes using friend function

1637


why reinterpret cast is considered dangerous?

1896


Why is polymorphism important in oop?

629


Why is oop better than procedural?

602






Why do while loop is used?

570


What is interface? When and where is it used?

1663


class type to basic type conversion

1833


What is inheritance write a program to show use of inheritance?

611


What is advantage of inheritance?

685


what is different between oops and c++

1999


What does oop mean in snapchat?

680


What is encapsulation oop?

574


What is abstraction and encapsulation?

567


What is persistence in oop?

668