Difference between Class and Struct.

Answer Posted / naksh @tcs

The major difference between struct and class is :
Struct donot contain functions(methods) as its members.

Yes, by default members of struct are public and that of a
class are private.

Is This Answer Correct ?    33 Yes 79 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of linkage exist in c?

783


What are the different properties of variable number of arguments?

909


Why is structure important for a child?

831


What is c programming structure?

823


What are the different types of objects used in c?

748


What is the difference between Printf(..) and sprint(...) ?

1072


Explain that why C is procedural?

896


What are the c keywords?

960


What is the use of header?

827


c program to compute AREA under integral

2076


Is c language still used?

729


"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks

885


Differentiate between new and malloc(), delete and free() ?

903


What is sizeof array in c?

774


Which is best linux os?

766