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.


The program displays the following output on the screen:

In displayInstanceVariable function
In displayInstanceVariable function