CS99 Fall 2002 Lab #9 (11/5/02) Due 11/8 at noon. 1. Exercise 2.1 from Chapman Answer the following questions for the array shown below -- -- | 1.1 0.0 2.1 -3.5 6.0| array1 = | 0.0 1.1 -6.6 2.8 3.4| | 2.1 0.1 0.3 -0.4 1.3| |-1.4 5.1 0.0 1.1 0.0| -- -- a. What is the size of $array1$? b. What is the value of $array1(4,1)$? c. What is the size and value of $array1(:,1:2)$? d. What is the size and value of $array1([1 3], end)$? 2. Exercise 6.12 from Chapman Write a program that accepts an input string from the user and determines how many times a user-specified character appears within the string. 3. Exercise 6.15 from Chapman Write a program that accepts a series of strings from a user with the $input$ function, sorts the strings into ascending order, and prints them out. 4. Reverse that array Write a program that reverses the elements in a 2D array. For instance, the elements inside the following array -- -- | 1 2 3 | | 4 5 6 | -- -- would become -- -- | 6 5 4 | | 3 2 1 | -- -- You must use nested loops. Do not use the $sort$ function.