CS 2401 Quiz #1

Date: Monday, January 25, 2010.

1. Let an array fluShotPrice[i] contain the price of flu shots at different El Paso locations, and let name[i] contains the name of the i-th location (e.g., Walgreen or Student Health Center). Write down a piece of code that finds the name of the location that offers the cheapest flu shot. Trace this code on an example of 3 locations Walgreen, Student Health Center, and Airport, with prices correspondingly $19.99, $15.00, and $18.00.















































Turn over, please.

2. Please answer questions about the reading assignment:

2a. can an array be 2-dimensional?

2b. can an array be 3-dimensional?

2c. is it possible to have a 2-dimensional array with rows of different size?