What are the differences between a struct and a class in
C++?
Answer Posted / ajit
In structures by default the member variables considered as
public where as in classes by default data members are
considered as private.
Structures doesn't provide the concept data encapsulation
but classes provides it.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is the standard template library (stl)?
Can we use struct in c++?
How does c++ structure differ from c++ class?
Explain the properties and principles of oop.
What is c++ hiding?
Explain how to initialize a const data member.
Explain the concept of dynamic allocation of memory?
What does asterisk mean in c++?
What is the use of endl in c++ give an example?
What is null pointer and void pointer?
How is computer programming useful in real life?
Explain how overloading takes place in c++?
Is map thread safe c++?
Define stacks. Provide an example where they are useful.
Is c++ a good first language to learn?