Midterm224 - Comp Sci 1MD3 Mid-Term II 2003 Dr Jacques Carette Name Student No Duration 50 minutes This midterm contains 19 questions on 4

Info iconThis 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.
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. (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. 3. Name the programming paradigm of each the following languages (1 point each):
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 10/27/2009 for the course COMP SCI 1MD3 taught by Professor Various during the Winter '07 term at McMaster University.

Page1 / 7

Midterm224 - Comp Sci 1MD3 Mid-Term II 2003 Dr Jacques Carette Name Student No Duration 50 minutes This midterm contains 19 questions on 4

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