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
How would you find out if a linked-list is a cycle or not?
Why do you use the namespace feature?
When one must use recursion function? Mention what happens when recursion functions are declared inline?
Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
what does the following statement mean? int (*a)[4]
Is java the same as c++?
Write some differences between an external iterator and an internal iterator? Describe the advantage of an external iterator.
What should main() return in c and c++?
Do you need a main function in c++?
What is the use of register keyword with the variables?
Which programming language's unsatisfactory performance led to the discovery of c++?
What is bubble sort c++?
Explain all the C++ concepts using examples.
What is c++ used for in games?
Difference between pointer to constant vs. Pointer constant