CS61A_sp98_mt2

CS61A_sp98_mt2 - cs61amt2_4 CS 61A Midterm#2 ver1.03 March...

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

View Full Document Right Arrow Icon
CS 61A Midterm #2 ver1.03 -- March 2, 1998 Exam version: A Your name ______________________________________ login: cs61a-_____ Discussion section number _____ TA's name _______________________________________ Look at the edge of your seat. Write your ROOM, seat row and number. Your row number may not be visible form where you sit, so we will help you later. __________ This booklet contains 6 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, worth 40 points, or about 13% of your total course grade. The exam contains 6 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. When writing procedures, don't put in error checks. Assume that you will be given arguments of the correct type. Our expectation is that many of you will not complete one or two of these questions. If you find one question especially difficult, leave it for later; start with the ones you find easier. READ AND SIGN THIS: I certify that my answers to this exam are all my own work, and that I have not discussed the exam questions or answers with anyone prior to taking this exam. If I am taking this exam at other than the regularly scheduled time, I certify that I have not/ will not discuss the exam questions or answers with anyone inappropriately. _______________________________________________ 0 /1 1 /6 2 /6 3 /5 4 /6 5 /10 6 /6 total /40 cs61amt2_4 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
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.

This note was uploaded on 11/23/2010 for the course CS 61A taught by Professor Harvey during the Fall '08 term at Berkeley.

Page1 / 7

CS61A_sp98_mt2 - cs61amt2_4 CS 61A Midterm#2 ver1.03 March...

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