CPS 1 (Ramm) Spring 1995 1 March 1995 Quiz #6 Name _______________________ Section _____ A. On the back of this sheet, write a subroutine called countzero which counts all of the used elements of a real array which are zero and sets the last parameter to that count. Assume you have declarations such as type realara=array[1..100] of real; var data:realara; size: integer; count: real; Then invoking your procedure with size := 90; countzero(data, size, count); writeln('The number of zero elements in the array is ', count); should print out the number of zeros in the first 90 elements of the array data. Make the order of your parameters match this example. JUST WRITE THE PROCEDURE, DON'T REPEAT THE DECLARATIONS SHOWN ABOVE (just use them). -------------------------------------------------------------------------- For the next two questions, assume that we have a database with the following entries. Assume that you are dealing with a program of the type discussed in the text or covered in the lectures. Ford 4dr Clarke green Chevy 2dr Herbert green Ford 4dr Hogan blue Chevy 4dr Anthony green Ford van Niven green Chevy 2dr Niven blue Dodge van Gibson blue B. Assume that the following query was typed into this program: Ford ? ? green What output is produced? C. Assume that the following query was typed into this program: ? van ? ? What output is produced?