Computer Science 61A - Fall 1998 - Harvey - Midterm 3

Computer Science 61A - Fall 1998 - Harvey - Midterm 3 - CS...

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

View Full Document Right Arrow Icon
CS 61A Midterm CS 61A Midterm #3 - November 9, 1998 61A MidtermCS 61A Midterm #3 - November 9, 1998 Your name login cs61a- Discussion section number TA's name This exam is worth 20 points, or about 13% of your total course grade. It includes two parts: The individual exam (this part) is worth 17 points, and the group exam is worth 3 points. The individual exam contains five substantive questions, plus the following: Question 0 (1 point): Fill out this front page correctly and put your name and login correctly at the top of each of the following pages. This booklet contains seven numbered pages including the cover page. Put all answers on these pages, please; don't hand in stray pieces of paper. This is an open book exam. When writing procedures, don't put in error checks. Assume that you will be given arguments of the correct type. Question 1 (3 points): What will the Scheme interpreter print in response to each of the following expressions? Also, draw a ``box and pointer'' diagram for the result of each expression. Hint: It'll be a lot easier if you draw the box and pointer diagram first ! (let ((x (list 1 2 3 4))) (set-car! x (cdr x)) x) (let ((x (list 1 2 3 4))) (set-car! (cdr x) (cadr x)) x) (let ((x (list 1 2 3 4))) (set-cdr! (cddr x) (cdr x)) x) Your name login cs61a- file:///C|/Documents%20and%20Settings/Jason%20Raft. ..-%20Fall%201998%20-%20Harvey%20-%20Midterm%203.htm (1 of 4)1/27/2007 6:28:48 PM
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS 61A Midterm Question 2 (3 points): (a) Suppose we say
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Computer Science 61A - Fall 1998 - Harvey - Midterm 3 - CS...

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