Quiz 2


20 pts., Mar. 20

  1. To what does the term scope of a variable refer?

    A variable's region of accessibility.

  2. If there is only one instance of a variable, say i, in a program, is visibility an issue for that variable? Why or why not?

    No, because it can't be ``hidden'' behind another instance of the same name.

  3. What happens when the statement
    is executed in a function? What should the return type be for a function containing this statement?

    The function ceases executing, returning to the calling function without transmitting a value back.

    The return type should be void.

Thomas P. Kelliher
Thu Mar 21 08:39:07 EST 1996
Tom Kelliher