CSE 413

Quiz #7

5/23/97

Closed book, closed pencil (to start, anyway)


Is there any difference between an enumeration type and a subrange type (yes or no)?

 

What type constructor corresponds to the mathematical concept of a Cartesian product?

 

Given an example of two variables which would be type equivalent under structural equivalence, but not under name equivalence. Circle the language you are using: C, Pascal, Ada.

 

 

Given an example of an implicit (or anonymous) type. Circle the language you are using: C, Pascal, Ada.

 

True or False: coercion is one form of explicit type conversion.

 

Name one way that the semantics (not syntax) of Dijkstra's "guarded do" command differs from the cond of LISP.

 

Some people use the term "parameter" to mean "__________ parameter" and "argument" to mean "__________ parameter".

 

Some languages distinguish between "procedures" and "functions." Briefly, what is the difference?

 

When is an activation record created?

 

Which of the following are likely to be found in an activation record (circle): global variables, local variables, source code, executable code, return addresses, links to other activation records, access chain, symbol table, parameter values, parameter types.

 

Our book mentions 4 kinds of parameters passing. Name them:

  1. pass by
  2. pass by
  3. pass by
  4. pass by

What is meant by an "exception" (in the context of programming languages)?

 

As a control mechanism, is exception handling considered to be explicit or implicit?

 

Name a programming language which DOES have an exception handling mechanism.

 

Name a programming language which DOES NOT have an exception handling mechanism.