Difference between Class and Struct.

Answer Posted / swetcha

The only difference between a struct and a class is in the
default access. By default, all the members of a struct are
public whereas in a class, al the members are private. The
same is true for the default inheritance type: a struct
entails public inheritance by default whereas a class
entails private inheritance.

Is This Answer Correct ?    98 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you generate random numbers in C?

657


What is the best style for code layout in c?

632


Is this program statement valid? INT = 10.50;

686


How can variables be characterized?

1652


What is a class c rental property?

611






What extern c means?

540


Why is structure padding done in c?

645


What is an array in c?

595


What is meant by recursion?

632


Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014  Npu university

1599


What are the different categories of functions in c?

643


How to create struct variables?

592


How do we print only part of a string in c?

587


Is Exception handling possible in c language?

1585


Explain union. What are its advantages?

617