What are the differences between a struct and a class in
C++?
Answer Posted / rsn
Hello Shivani,
I think both struct and class in C++ are quite the same
except for the fact that, members in struct are public by
default whereas they are private for class.
Moreover struct also supports inheritance,polymorphism
etc...etc...
| Is This Answer Correct ? | 14 Yes | 0 No |
Post New Answer View All Answers
Is c++ pass by reference or value?
What is setw manipulator in c++?
What is data abstraction? How is it different from data encapsulation?
Define private, protected and public access control.
Explain the benefits of proper inheritance.
Describe linked list using C++ with an example.
Can we define function inside main in c++?
What is lambda in c++?
How do I make turbo c++ full screen?
Is main a class in c++?
Is facebook written in c++?
How one would use switch in a program?
Why is standard template library used?
describe private access specifiers?
How static variables and local variablesare similar and dissimilar?