What is the difference between class and structure ?

No comments

 Class V/S Structure :-

1         .  By default all member variables of class are private (Access Specifies).

Where as the member variables of structure are publically defined.

2         .   Generally we do not include functions/methods with in a structure.

But class includes member variables and method both.

3         .   Class supports the inheritance, polymorphism ,constructor and destructor and many more object oriented programming(OOP) characteristics.

But structure does not support the OOP characteristics.

No comments :

Post a Comment

Subscribe

Milan Panda
Admin
About Me | Contact
Copyright 2023-2024 © Programming1011 . 🎀 Developed and Design By- Milan Panda. Happy Holi All Of You 🎀