This preview shows page 1. Sign up to view the full content.
Unformatted text preview: CS 103 Test 6 Fall 2009 Problem 1. (15 points) Enter answers to this problem into the function t6 p1 (in the provided M-file t6 p1.m ). A. An activation record is 1. the set of values assigned to a variable throughout a Matlab session 2. the set of locations in memory in which information is stored during a function’s activation 3. the set of fields of a struct assigned values when the struct is created 4. the set of values assigned to the fields of a struct when the struct is created B. Which of the following statements about base cases is(are) true? 1. Every properly written recursive function has at least one base case. 2. A base case never includes a call of the function in which it occurs. 3. A base case may include a call of a function other than the one in which it occurs. 4. All of the above. C. The function F is called from the Command Window. F calls G. G returns. F calls H. H calls G. G calls J. J is still active. Assume that there is one activation record on the stack for the Command Window. What is the current number of activation records on the stack? there is one activation record on the stack for the Command Window....
View Full Document
This note was uploaded on 12/12/2009 for the course CS CS 103 taught by Professor Fitzpatrick during the Spring '09 term at Vanderbilt.
- Spring '09