|
|
Quiz for One-dimensional Arrays
Part 1 – Answer the following questions on a separate piece of paper. 1. Explain the difference between the index and the element of an array. 2. Describe how data is linked in related arrays. 3. Give an example of a set of data that is best represented by related arrays.
Part 2 – Create a program to solve the following problem. Make sure your code is properly documented and structured. Print one copy of your code to hand in. The sample data file “quiz1.dat” contains a list of students in a class and their marks for the class. Read the marks into two related arrays. Using the values stored in the arrays, determine and display the class average and the name of the student with the highest mark. Source: Public and Catholic District School Board Writing Partnership, Course Profile: Computer and Information Science, Grade 11, University/College Preparation ICS3U, Queen’s Printer for Ontario, 2001, adapted. |
| ||||