m1-fall11 - CMSC330 Fall 2011 Midterm#1 Name Discussion...

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

View Full Document Right Arrow Icon
CMSC330 Fall 2011 Midterm #1 Name Discussion Time (circle one): 9am 10am 11am 12pm 1pm 2pm Do not start this exam until you are told to do so! Instructions You have 75 minutes to take this midterm. This exam has a total of 100 points, so allocate 45 seconds for each point. This is a closed book exam. No notes or other aids are allowed. If you have a question, please raise your hand and wait for the instructor. Answer essay questions concisely using 2-3 sentences. Longer answers are not necessary and a penalty may be applied. In order to be eligible for partial credit, show all of your work and clearly indicate your answers. Write neatly. Credit cannot be given for illegible answers. Problem Score 1 Programming languages /6 2 Ruby /6 3 Regular expressions & finite automata /10 4 RE to NFA /10 5 NFA to DFA /16 6 DFA minimization /10 7 Ruby programming /24 8 OCaml /18 Total /100
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. (6 pts) Programming languages a. (3 pts) List a programming language feature that makes it easier to write programs, but make it more difficult to detect errors in the program. Explain why. b. (3 pts) What language feature in Ruby is similar to anonymous functions in OCaml / Java? Explain. 2. (6 pts) Ruby What is the output (if any) of the following Ruby programs? Write FAIL if code does not execute. a.
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 01/13/2012 for the course CMSC 330 taught by Professor Staff during the Fall '08 term at Maryland.

Page1 / 8

m1-fall11 - CMSC330 Fall 2011 Midterm#1 Name Discussion...

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