University of Iowa Computer Science Department

Quiz 08


1. Declare a one-dimensional array (named a) with 10 elements. Initialize the i-th location in the array to i * 3 and then compute and output the sum of the elements in the array.

2. Declare a two-dimensional array (named b) with 3 rows and 5 columns. Initialize the i,j-th element to i * i + j * 2.

UI CLAS CRA ACM Valid CSS! Valid XHTML 1.0 Transitional Level Double-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0 Cynthia tested
| Modified: .