Display contents of each instance variable
Then the program invokes an instance function named displayInstanceVariable on each of the two objects.
(Note the use of the -> operator for this purpose.)
This function displays the contents of the instance variable encapsulated in the object on which the function is invoked.
Output
The program displays the following output on the screen:
In displayInstanceVariable function 3 In displayInstanceVariable function 10