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



c++ provides classes...and classes do what we want but why then strcut are used...if we say data h..

Answer / 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

More OOPS Interview Questions

What is and I oop mean?

1 Answers  


what is the difference between class and structure in C++?

9 Answers   Aspire, IBS, TCS,


JAVA is FULLY OBJECT ORIENTED PROGRAMING LANGUAGE?

3 Answers  


what is the difference between ERROR and EXCEPTION?

14 Answers   NIIT, nvidia,


I am developing a payroll system mini project.I used file concept in program for reading and writing.When the program is reloading into the memory that is if i execute next time the file was cleaned and adding data from the starting this is my problem.I want to strore the previous data and if i want to add any record that should be next of previous data.Please help me.

0 Answers  


Why a "operator=(...)" when there is a copy ctor?

2 Answers  


What is object and class in oops?

1 Answers  


What is advantage of inheritance?

1 Answers  


Why do we need polymorphism in c#?

1 Answers  


program in c++ that can either 2 integers or 2 floating point numbers and output the smallest number

1 Answers   Anna University,


difference between structure and union.

2 Answers   ADP, Convergys,


Why is polymorphism important in oop?

1 Answers  


Categories