University of Iowa Computer Science Department

Quiz 07

 

1. Declare an integer array with 10 locations. Fill each element of the array with the number 123.

2. Assume that you have the following array declaration and assignment statement:

string[] a = new string[5];
a[0] = "Go Hawks!";

Draw a picture of how this structure will be allocated in memory. Recall that an array is a reference type.

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: .