{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

midterm224 - Comp Sci 1MD3 Mid-Term II 2003 Dr Jacques...

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

View Full Document Right Arrow Icon
Comp Sci 1MD3 Mid-Term II 2003 Dr. Jacques Carette Name: Student No.: Duration : 50 minutes This midterm contains 19 questions on 4 double-sided pages (including this one). This midterm will be marked out of 50. There are 55 total marks available. Answer the question in the space provided. Do not separate the pages. Make sure that you do not get stuck on one question; use your time wisely.
Image of page 1

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

View Full Document Right Arrow Icon
1. (Basic functional programming) Assume that the following Maple statements have already been executed L := [1,2,3,4,5,6,7]; g := x -> (y->x*y); h := [[3], [3, 9], [3, 9, 27], [3, 9, 27, 81], [3, 9, 27, 81, 243]]; What is the result of executing the following Maple statements (1 point each): [3] (a) map( x 10 * x ,L); (b) map(g(a), L); (c) map( x add( i, i = x ),h); 2. All of the following questions are true/false and worth 1 point each. [8] (a) Black box testing allows you to look at the code to generate tests. (b) Coverage testing tells you if every execution path in a routine is tested. (c) It is possible to have a C function return a function pointer as a return value. (d) XML is a programming language. (e) XSL is a programming language. (f) It is possible to implement a linked-list of bounded length using an array. (g) A skip list is a variation on a linked-list with a (random) number of forward pointers. (h) The “relations” that one finds in a database are different than relations in mathe- matics.
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