CIS 162 AD - C# Programming I - Section 5832
Midterm Exam
Due Thursday, March 9, 2006
Name:
Definitions: please explain the following terms:
- array
- array index
- array length
- sort
- parallel arrays
- multidimensional array
- jagged array
- Equals() method
II. Questions or short essay
- What is the syntax of the statement that declares an array?
- What are advantages of using an array to hold data in your program?
- What does it mean that C# performs bounds checking?
- What is the syntax of the foreach loop?
- What does the reverse() method of the Array class do?
- What are advantages of using an arrayList over an array?
- What does it mean that a string is immutable?
III. Programming Exercise
Write a program for a package delivery service. The program contains an array that holds the 10 ZIP codes to which the company delivers packages. Prompt a user to enter a ZIP code and display a message indicating whether the ZIP code is one to which the company delivers.