Difference between Class and Struct.
Answer Posted / ajay prajapat
1. Structure is value type where is class is refrance
type.So class data is store in heap where as stuct data are
store in stack.
2. default type of function in struct is public where as
private in class
| Is This Answer Correct ? | 55 Yes | 15 No |
Post New Answer View All Answers
What are 3 types of structures?
What is the use of sizeof?
why programs in c are running with out #include
What are examples of structures?
What is the purpose of clrscr () printf () and getch ()?
Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?
Does c have class?
What is #line in c?
How can I remove the leading spaces from a string?
while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above
How are Structure passing and returning implemented by the complier?
How to Throw some light on the splay trees?
Explain what are header files and explain what are its uses in c programming?
How do I swap bytes?
Explain the difference between malloc() and calloc() function?