CS61A_sp98_mt2

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

Info icon This 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
Image of page 1

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

View Full Document Right 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):
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern