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
What is code reusability in c++?
What is #include cmath?
Explain Text Manipulation Routines?
Incase of a function declaration, what is extern means?
Can non-public members of another instance of the class be retrieved by the method of the same class?
How would you obtain segment and offset addresses from a far address of a memory location?
If there are two catch statements, one for base and one for derived, which should come first?
. If employee B is the boss of A and C is the boss of B and D is the boss of C and E is the boss of D. Then write a program using the Database such that if an employee name is Asked to Display it also display his bosses with his name. For eg. If C is displayed it should also display D and E with C?
Explain how the virtual base class is different from the conventional base classes of the opps.
C is to C++ as 1 is to a) What the heck b) 2 c) 10
List the issue that the auto_ptr object handles?
What is an adaptor class or wrapper class in c++?
What is c++ virtual inheritance?
How does the copy constructor differ from the assignment operator (=)?
Why is c++ still used?