The displayData function

The displayData function is shown in its entirety in Listing 4.