Your Ad Here
0

What is the difference between class and structure?

Posted by The Blogger on 8:25 AM in
Answer:

Structure: Initially (in C) a structure was used to bundle different type of data types together to perform a particular functionality. But C++ extended the structure to contain functions also. The major difference is that all declarations inside a structure are by default public.
Class: Class is a successor of Structure. By default all the members inside the class are private.


interview questions and answers, interview question What is the difference between class and structure, What is the difference between class and structure

Your Ad Here

Copyright © 2009 Interview Questions and Answers