Interview answers verified by specialists.

Find interview questions and answers on this website:


See right interview answers on 30 common job interview questions

What are the difference between Structure and Class?

  •  Structures are Values types while Classes are Reference types. 
  •  In structure values stored in stack while in class value's reference stored in heap. 
  •  In structure direct values is stored while in class reference to a value is stored. 
  •  Inheritance is supported in classes while structure doesn't support. 
  •  We cannot declare destructor in structure whereas in class it is possible. 
  •  We can't have explicitly parameter less constructors in structure whereas classes can have. 
  •  Class can have protected members while structure can't have. 
  •  Structure is declared by using struct keyword while class is declared by using Class keyword. 
  •  Structures don't have memory management while classes have due to garbage collector. 
  •  New operator works in classes while not in structure.

Do you know that?

Find a project management application you like and stick to it. Next

Articles:

Popular:

Fast Payments
Payoneer sing up to get free 
$25