What is the difference between Class and Structure?

Answer Posted / vadivel

i. Structure are value type where as class are reference
type.
ii. Structure are default public where as class are default
private.
iii. 'this' pointer will work only in class.

Is This Answer Correct ?    395 Yes 78 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by enumerated data type?

565


Explain the static storage classes in c++.

697


Should I learn c or c++ or c#?

550


How would perform Pattern Matching in C++?

645


Define a constructor - what it is and how it might be called (2 methods)?

596






What are 2 ways of exporting a function from a dll?

604


What operators can you overload in c++?

586


List the special characteristics of constructor.

718


What are stacks? Give an example where they are useful.

584


What is object file? How can you access object file?

591


What does catch(…) mean?

604


Is it possible for a member function to use delete this?

559


What is a string example?

541


What is a storage class used in c++?

600


Can we define function inside main in c++?

542