What's the difference between a struct and a class?

What's the difference between a struct and a class?

Many diff are there in strut and a class .class members is a private by default but in case of struts members are by default public. ans the class is a C++ element and struct is a C one. We can have functions, virtual functions, inheritance, different access modifiers private, protected, public in a class but probably not in a struct. A struct generally holds member variables only."

By:Umang
Date:2006-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Subjective Links

C Subjective interview questions and answers for experienced and fresher