Why do we use classes in c++?



Why do we use classes in c++?..

Answer / Vashu Rajput

Classes in C++ allow for the creation of user-defined data types and objects with their own properties (attributes) and behaviors (methods). They help organize code, encapsulate data, and promote reusability and maintainability.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

which is best institue to learn C/C++ IN AMEERPET OR MAITHRIVANAM OR SR NAGAR, PLEASE HELP. THANKS IN ADVANCE

5 Answers  


What is the output of the following program? Why?

1 Answers  


Can char be a number c++?

1 Answers  


What do you mean by volatile and mutable keywords used in c++?

1 Answers  


What is an iterator?

1 Answers  


What would happen on forgetting [], while deallocating an array through new?

1 Answers  


Does std endl flush?

1 Answers  


Can you pass a vector to a function?

1 Answers  


What is bubble sort c++?

1 Answers  


Why would you make a destructor virtual?

3 Answers   Lehman Brothers,


What is pure virtual function?

1 Answers  


What are static type checking?

1 Answers  


Categories