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
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
how to get the oracle certification? send me the answer
Please send ford technologies placement paper 2 my mail id
What is polymorphism what is it for and how is it used?
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.
Why multiple inheritance is not possible?
What is variable example?
What does oop mean in snapchat?
What are the data types in oop?
Why is polymorphism used?
What is the difference between encapsulation and polymorphism?
What is multilevel inheritance in oop?
what is different between oops and c++
What is the advantage of oop over procedural language?
What is abstraction in oop?