1.

Find which of the following uses encapsulation?(a) void main(){int a;void fun( int a=10;cout

Answer»

The correct option is (c) class student{INT a; PUBLIC: void disp(){ cout<
The explanation is: It is the class which uses both the data members and member functions being declared inside a single
UNIT. Only data members can be there in structures also. And the encapsulation can only be ILLUSTRATED if some data/operations are associated within class.



Discussion

No Comment Found

Related InterviewSolutions