What Do U Understand by A Member Function
What Do U Understand by A Member Function
Ans:-member function has full access priviledge to both the public and private
memebers of the class while in general non member functions have access only
to the public datamembers of the class.
Member functions are defined within the class scope that is they are not visible
outside the scope of class .nonmember functions are visible outside the class.
ANS:-a class binds together data and its associated functions under one unit
thereby enforcing encapsulation as encapsulation means wrapping up data and
associated functions together into a single unit. A class group its members into
three sections private ,protected and public .the private and protected members
remain hidden from outside world .thus through private and protected members
a class enforces data hiding .the outside world is given only the essentisal and
necessary information through public members rest of the things remain hidden
which is nothing but abstraction.as abstraction means representation of
essential features without including the background details or explanation.
Rules of inheritance
Accessible by object :-
1.public members of own class
2. public and protected members of all other linked base classes.(private , public
, protected)
BYTES OCCUPIED:-
Char-1
Int/short-2
‘long/float-4
Double-8
Long double-8
Pointer-2
@the pointer access cannot be underutilised upon the sub didvisional classes
which are not permitted upon the socialbele opportunituies
Having upon