Here student class has three data members rollno, name and marks, and two member
functions input ( ) and show ( ). The data is hidden from outside world and is only
accessible by two functions inside class.
Main advantage of encapsulation and data hiding is that they protect the data from
outside world so that the data should not be misused or manipulated.