CS 1401, Quiz #11, version a

Date: Tuesday, November 29, 2005
Name (please type legibly, ideally in block letters): ______________________________________________________________________

1. Write down a code that, given two arrays a[i] and b[i], returns their component-wise product, i.e., an array c for which c[0]=a[0]*b[0], c[1]=a[1]*b[1], ...

2. Write down a method that, given an array a, returns the sum of all negative elements of this array.