- [Pts 2]
A dynamic variable is allocated by (only one answer, please)
- a declaration of a dynamic class
- a declaration of a dynamic function
- a declaration of a variable of type pointer
- a "new" instruction
- [Pts 2]
In the standard implementation of C and C++ a local variable is allocated on (only one answer, please)
- the heap
- the stack
- the globals' space
- the local data base
- [Pts 2]
A memory leak is (only one answer, please)
- a location in the heap which is leaking information
- a location which is free for further allocation
- a location on the heap which is not free and not accessible from the program
- a location on the stack which was not deallocated when the AR was removed
- [Pts 2]
A dangling reference can be produced by (only one answer, please)
- a delete instruction
- a dangling-else command
- an assignment of the kind p = NULL; where p is a variable of type pointer
- a declaration of a variavble of type pointer
- [Pts 2]
The difference between static scope and dynamic scope is relevant in languages which (only one answer, please)
- allow both static and dynamic execution of programs
- allow both static and dynamic type checking
- allow both static and dynamic variables
- allow nested procedure declarations