CS 2401 Quiz #1

Date: Tuesday, January 27, 2009.

1. Let height[i] describe the height of student i, and let name[i] describe the name of student i. Write down a piece of code that finds the name of the tallest student and his or her height. Trace this code on an example of 3 students with names A, B, and C, and heights of 170, 180, and 165 cm.

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?