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
How many parameters should a function have?
What is malloc() function?
If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?
What is meant by inheritance?
Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.
Why does the call char scanf work?
What are the two forms of #include directive?
What is the difference between functions getch() and getche()?
What is "Duff's Device"?
What is the correct declaration of main?
what is the format specifier for printing a pointer value?
Explain Basic concepts of C language?
Is null always equal to 0(zero)?
write a c program to calculate sum of digits till it reduces to a single digit using recursion
What is the benefit of using const for declaring constants?