Computer Science 61A - Spring 1998 - Fateman - Midterm 2

# Computer Science 61A - Spring 1998 - Fateman - Midterm 2 -...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
cs61amt2_4 0 /1 1 /6 2 /6 3 /5 4 /6 5 /10 6 /6 total /40 1 Your name _________________________________________ login cs61a-___ Exam version: A Question 1 (6 points): Draw box-and-pointer diagrams that represent the results of the following expressions. (1 point each) (define x1 (list (cons 'a 'b) (list 'c 'd))) (define x2 (cons 'a (cons 'b (cons 'c 'd)))) (define x3 (list 'a 'b 'c (cons 'd '()))) (define x4 (append (list (cons 'a 'b)) (list '()))) (define x5 '((1 2) 3 . 4)) (define x6 '(1 (2 . 3))) Question 2 (6 points): Assume that we are using a representation of a matrix as a list of lists, namely ((1 2 3) (4 5 6) (7 8 9)) is the matrix H: file:///C|/Documents%20and%20Settings/Jason%20Raft. ..0Spring%201998%20-%20Fateman%20-%20Midterm%202.htm (2 of 8)1/27/2007 6:29:50 PM
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 05/17/2009 for the course CS 61A taught by Professor Harvey during the Spring '08 term at University of California, Berkeley.

### Page1 / 8

Computer Science 61A - Spring 1998 - Fateman - Midterm 2 -...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online