CSCI 461 ACTUAL EXAM QUESTIONS
AND CORRECT DETAILED ANSWERS
(VERIFIED ANSWERS)
Even though count has local scope, it still has a static lifetime. -
correct answer ✅true
The activation record for the following function can be deallocated
as soon as the function returns.
fun f x = fn y => y + 1; -
correct answer ✅true
Consider the following code:
fun addXToAll (x,theList) =
let
fun addX y = y + x;
in
, CSCI 461 ACTUAL EXAM QUESTIONS
AND CORRECT DETAILED ANSWERS
(VERIFIED ANSWERS)
map addX theList
end;
Which function calls addX? -
correct answer ✅map
The following ML function contains a function call that passes a
function parameter f. In each case, will the function f use its nesting
link when it is called.
fun haveFun f = map f [1, 2, 3, 4, 5, 6]; -
correct answer ✅Cannot determine. Need know the definition of f.
Which of the following are in an activation record? -
correct answer ✅Link to caller's activation record
activation-specific variables
AND CORRECT DETAILED ANSWERS
(VERIFIED ANSWERS)
Even though count has local scope, it still has a static lifetime. -
correct answer ✅true
The activation record for the following function can be deallocated
as soon as the function returns.
fun f x = fn y => y + 1; -
correct answer ✅true
Consider the following code:
fun addXToAll (x,theList) =
let
fun addX y = y + x;
in
, CSCI 461 ACTUAL EXAM QUESTIONS
AND CORRECT DETAILED ANSWERS
(VERIFIED ANSWERS)
map addX theList
end;
Which function calls addX? -
correct answer ✅map
The following ML function contains a function call that passes a
function parameter f. In each case, will the function f use its nesting
link when it is called.
fun haveFun f = map f [1, 2, 3, 4, 5, 6]; -
correct answer ✅Cannot determine. Need know the definition of f.
Which of the following are in an activation record? -
correct answer ✅Link to caller's activation record
activation-specific variables