What is the difference between class and structure?

Answer Posted / guest

structure is a value type class is reference type,
struct Memory will be on stack and class Memory stored on
Heap,
struct not suports inheritance and class can?

Is This Answer Correct ?    18 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?

1639


write a program to find 2 power of a 5digit number with out using big int and exponent ?

1900


What is encapsulation in oop?

612


What is static in oop?

591


What is class and object with example?

593






What is the purpose of polymorphism?

683


What are functions in oop?

586


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

1461


Write a c++ program to display pass and fail for three student using static member function

2820


What is abstract class in oops?

604


What is polymorphism what is it for and how is it used?

576


What type of loop is a for loop?

687


How to use CMutex, CSemaphore in VC++ MFC

4335


Why do we use polymorphism in oops?

586


What is advantage of inheritance?

694