Koofers

Past Exam for CMSC 330 - ORGNZTN PROGM LANG at Maryland (UMD)

Exam Information

Material Type:Mid-Term
Professor:Staff
Class:CMSC 330 - ORGNZTN PROGM LANG
Subject:Computer Science
University:University of Maryland
Term:Spring 2008
Keywords:
  • Implicit Variable Declarations
  • Minimal Size
  • Transitions
  • Correct Result
  • Minimal Size Dfa
  • Code Example
  • Explanation
  • Different Models
  • Organization
  • Alphabetical Order
Login / Sign Up to View Document
Preview Page 1Preview Page 2Preview Page 3Preview Page 4Preview Page 5Preview Page 6

Sample Document Text

CMSC330 Spring 2008 Midterm #1 Solutions 1. (12 pts) Programming languages a. Explain why goals for programming languages have changed since the 1960's Because computers have become powerful (cheap) and programmers (relatively) expensive. // 2 pts b. Do programs run faster when they are interpreted or compiled? Explain why. Compiled, because interpreted programs have an additional layer of software (the interpreter). // 2 pts c. Describe the syntax and semantics of a Ruby while loop. Make clear which is which. Syntax = "while" followed by guard, followed by body, followed by "end". Semantics = if guard does not evaluate to nil, execute body, repeat // 2 pts d. Name a disadvantage of implicit variable declarations. Give a Ruby code example. Incorrect variable usage (e.g., misspelling) is not caught at compile time. "cat = 1" vs "ca = 1", where ca is not a real variable // 2 pts e. (4 pts) Explain why implicit variable declarations and static types are not consi...

Related Documents

Implicit Variable Declarations Exam
Implicit Variable Declarations Exam
Ruby Program Exam
Ruby Program Exam
Ruby Program Exam
Binary Numbers Exam
Text Processing Exam
Text Processing Exam
Text Processing Exam
Ruby Regular Expression Exam
Ruby Regular Expression Exam
Ruby Regular Expression Exam
Ruby Regular Expression Exam
Ruby Regular Expression Exam
Ruby Standard Library Exam
Ruby Standard Library Exam
155, "/var/app/current/tmp/"