cs103_test1_2009f_v_01

cs103_test1_2009f_v_01 - CS 103 Test 1 Fall 2009 Enter your...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 103 Test 1 Fall 2009 Enter your answers into the M-files provided. Each problem has its own M-file. Problem 1. (15 points) A. Which of the following is not an algorithm. 1. Start with 11, add each successive prime number until the sum is greater than 1000, stop, and print the sum. 2. Start your car, put it in reverse, straighten the wheels, drive 15 feet, and stop the car. 3. Print all integers greater than 100. 4. All the above are algorithms. B. In Matlab, C++, and Java, a named location in memory is called 1. A variable 2. A cell 3. An operator 4. An index C. The transpose of a matrix is obtained by 1. Reversing the order of the columns 2. Negating each element 3. Reversing the order of the rows 4. Interchanging the row and column indices of each element D. Which of the following lists contains only commutative operations? 1. Addition, subtraction, and array multiplication 2. Addition, array division, and array multiplication 3. Addition, array multiplication and matrix multiplication 4.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.
Ask a homework question - tutors are online