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
If I is an integer variable, which is faster ++i or i++?
Why c++ is faster than java?
Discuss the possibilities related to the termination of a program before entering the mainq method?
What is iomanip c++?
Incase of a function declaration, what is extern means?
Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort
What is a pdb file?
Can we use struct in c++?
What do you mean by translation unit in c++?
What are the differences between the function prototype and the function defi-nition?
Is linux written in c or c++?
What are manipulators in c++ with example?
Keyword mean in declaration?
What is the latest version on c++?
What is unary operator? List out the different operators involved in the unary operator.