What is the difference between Class and Structure?
Answer Posted / nikhil jain
Structures are value types; classes are reference types.
Structures use stack allocation; classes use heap
allocation.
A structure must have at least one nonshared variable or
event member; a
class can be completely empty.
Is This Answer Correct ? | 4 Yes | 9 No |
Post New Answer View All Answers
What is copy constructor? Can we make copy constructor private in c++?
What do you understand by a pure virtual member function?
Define Virtual function in C++.
What is a map in c++?
What is std :: endl?
What are references in c++?
What is c++ array?
what is upcasting in C++?
What does it mean to declare a member function as virtual?
What is stl containers in c++?
What is buffer and example?
What is the header file for setw?
What does floor mean in c++?
Difference between overloading vs. Overriding
What is abstraction c++?