{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

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.

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

View Full Document
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.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern