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
How can you quickly find the number of elements stored in a dynamic array? Why is it difficult to store linked list in an array?
What are keywords in c++?
What are the effects after calling the delete this operator ?
How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?
What are the new features that iso/ansi c++ has added to original c++ specifications?
Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?
What are libraries in c++?
What does n mean in c++?
What happens when the extern "c" char func (char*,waste) executes?
Evaluate !(1&&1||1&&0) a) Error b) False c) True
Explain how the virtual base class is different from the conventional base classes of the opps.
What is a storage class used in c++?
What is a far pointer? where we use it?
How can you link a c++ program to c functions?
Write about the retrieval of n number of objects during the process of delete[]p?