This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: CS3723 Midterm Exam 2 Nov 14, 2008 1. (30pts) Finish the following sentences by filling in the blanks. (a) In programming languages, a block is a region of code that . Blocks can be each other but not each other. An example of a block in Scheme is ; An example of a block in ML is . (b) When programs are loaded to memory to be evaluated, its memory space can be separated into three components, the , which contains ; the , which contains ; and the , which contains . (c) The scoping rule of a programming language defines where to look for the scope of (i.e., the block that declares) non-local variables at runtime. If static scoping is used, we find the scope of a non-local variable by looking in ; in contrast, if dynamic scoping is used, we find the scope of a non-local varable by looking in . (d) The value of a function is called a closure , which contains two fields, the , which points to ; and the , which points to ....
View Full Document
- Spring '08
- Software engineering, Control flow, following ML code