[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++

90. What is the difference between class and structure?

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.

Asked In :: TCS iGate Accenture

Post Your Answer Here:

Name *
Email
Alert me

Post Your Reply Here:

Report Error

Please Login First Click Here