[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Technical Discussion :: C++

108. What is the difference between class and structure?

Answer:

1. Members of a class are private by default and members of struct are public by default.


2. 'struct' is the keyword for Structure and 'class' is the keyword for Class.


3. Structure is used for smaller amount of data and Class is used for larger amount of data.


4. Structure is usually as for grouping of data and Class is for inheritence and further abstraction.


 

Asked In :: Capgemini Virtusa Syntel Inc. Societe Generale

Post Your Answer Here:

Name *
Email
Alert me

Post Your Reply Here:

Report Error

Please Login First Click Here