CS 2401 Quiz #1

Date: Tuesday, January 26, 2009.

1. Let an array price[i] contain the price of our CS1/CS2 textbook at different (online and real) stores, and let name[i] contains the names of these stores. Write down a piece of code that prints the name of the store from where you can get the book at the cheapest Price. Trace this code on an example of 3 stores UTEP Bookstore, amazon.com, and textbooks.com, with prices (fictitious) $125, $90, and $92.

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?