Difference between Class and Struct.

Answer Posted / naresh kukreti

1)measure difference between structure and class is that
the structure doesn't inherit but class is inherit
2)by default the data members of structure are public but in
case of class data members are private
3) Class is much secure ,but structure is not secure

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pointer to pointer in c language?

591


Why C language is a procedural language?

614


What are volatile variables in c?

513


What is the difference between memcpy and memmove?

597


if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

1442






Do variables need to be initialized?

616


What is c preprocessor mean?

781


Are enumerations really portable?

590


What is null pointer constant?

590


Do you know null pointer?

599


What is use of integral promotions in c?

660


Why can't I perform arithmetic on a void* pointer?

633


When c language was developed?

632


Explain what is dynamic data structure?

642


Can we compile a program without main() function?

628