What is Encapsulation in C++ ?

No comments
Encapsulation :- It is amechanism that associates the code and the data. It manipulates into a single unit(class) and keeps then safe from external encapsulation is supported by a construct called class.

Example :- class student
                           {
                                       private:

                                       char * name;
                                    public :
                                        void getdata ();
                                        void showdata ();
                           };

Data and methods are encapsulated in class.

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 🎀