+ read from the input file whose name is stored in: fname,
+ read the first number in the file to determine how many
data items are in the rest of the file,
+ copy the data items in the file into the array called: data, and
+ set the parameter numSlotsUsed equal to the number of
items copied into the array.
(Function getData copies the first data item in the file, if one
exists, into data[0], copies the second data item into data[1], and so
on.)
Function getData handles the following exceptional situations:
+ input file cannot be opened,
+ input file has no data items, and
+ input file contains more data items than the value of arraySize.
In those situations, function getData prints an error message and
terminates execution of the program (It calls the exit() function.).