Computer Science 61A - Spring 1999 - Harvey - Midterm 2

Computer Science 61A - Spring 1999 - Harvey - Midterm 2 -...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 61A, Midterm #2, Spring 1999 CS 61A, Spring 1999 Midterm #2 Professor Brian Harvey Question 1 (4 points): What will Scheme print in response to the following expressions? If an expression produces an error message, you may just say "error"; you don't have to provide the exact text of the message. If the value of an expression is a procedure, just say "procedure"; you don't have to show the form in which Scheme prints procedures. Also, draw a box and pointer diagram of the value produced by each expression. (cons '(a b) '(( c d))) (cdadr '((1 2 3) (4 5 6) (7 8 9))) (cons (list '(a) '(b)) (list 'c 'd)) (cons '(a b) 'c) file:///C|/Documents%20and%20Settings/Jason%20Raft...20Spring%201999%20-%20Harvey%20-%20Midterm%202.htm (1 of 5)1/27/2007 6:29:50 PM CS 61A, Midterm #2, Spring 1999 Question 2 (5 points): A three-tree is a tree-like structure in which each node contains two values, called the left-datum and the right-datum , and up to three children, called the left-branch , the middle-branch , and the right- branch...
View Full Document

This test prep was uploaded on 04/20/2008 for the course CS 61A taught by Professor Harvey during the Fall '08 term at University of California, Berkeley.

Page1 / 5

Computer Science 61A - Spring 1999 - Harvey - Midterm 2 -...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online