Why do we use classes in programming?



Why do we use classes in programming?..

Answer / Dhirendra Kumar Shukla

Classes provide a blueprint for creating objects (known as instances) that have properties and behaviors. They allow developers to organize code, encapsulate data, and create reusable components.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is auto used for in c++?

1 Answers  


Why do C++ compilers need name mangling?

3 Answers   Lucent,


Define pre-condition and post-condition to a member function in c++?

1 Answers  


How many bit combinations are there in a byte?

13 Answers   Intel, Microsoft,


What is an adaptor class or wrapper class in c++?

1 Answers  


When does a name clash occur in c++?

1 Answers  


What is a constructor and how is it called?

1 Answers  


Write a program to swap 2 chars without using a third varable? char *s = "A"; char *p = "B";

7 Answers   CTS,


What are the manipulators in c++?

1 Answers  


How do you remove an element from a set in c++?

1 Answers  


Why is c++ awesome?

1 Answers  


What is runtime polymorphism in c++?

1 Answers  


Categories