Computer Science 3675
Summer 2003
Practice questions for quiz 3

  1. What is the purpose of the static link in a frame in the run-time stack?

  2. What is the purpose of the dynamic link in a frame in the run-time stack?

  3. What information is stored in a function closure?

  4. In C, you are not allowed to write a function inside another function. But C does allow you to treat a function as a value. Does C need to use function closures?

  5. What is the value of Scheme expression (car (cdr (cons 'horse (cons 'zebra ()))))?

  6. Write a Scheme function called prefix so that (prefix x y) returns true if list x is a prefix of list y. Be careful to use Scheme syntax correctly.

  7. Explain the purpose of a dereference operation in the semantics of an imperative language.

  8. How does a denotational semantics differ from an operational semantics?

  9. Are backtracking and exception handling the same thing? For example, can you use the exception handling mechanism of Java to do backtracking?

  10. What is one important motivation for including exception handling in a programming language?