Week 3

Which of the following are not part of the layout of a process in memory?
1) Constants
4) Run-time stack
2) Program comments
5) None of the above
3) Symbol table
Why do the heap and run-time stack not have a fixed size (during program execution) like the other parts of the process layout in memory?
1) Disallow
3) Explicit resolution
2) Implicit resolution
4) Inherited resolution
5) None of the above
Which of the following are true regarding reference counts?
1) Reclaims unused memory as soon as it is no longer needed.
2) Is periodically run, so some allocated but unused memory is taking up heap space at various times.
3) Prevents any other computations while it is reclaiming unused memory.
4) Compacts the memory currently being used as part of the process.
5) None of the above
Which of the following are true regarding the Mark and Sweep garbage collection algorithm?
1) Reclaims unused memory as soon as it is no longer needed.
2) Is periodically run, so some allocated but unused memory is taking up heap space at various times.
3) Prevents any other computations while it is reclaiming unused memory.
4) Compacts the memory currently being used as part of the process.
5) None of the above
Which of the following are true regarding copying algorithms for garbage collection?
1) Reclaims unused memory as soon as it is no longer needed.
2) Is periodically run, so some allocated but unused storage is taking up heap space at various times.
3) Prevents any other computations while it is reclaiming unused memory.
4) Compacts the memory currently being used as part of the process.
5) None of the above
Compilers differ from interpreters by
1) Producing program output directly from the compiler.
2) Creating either object code or an intermediate code version of the program source code.
3) Analyzing program input to perform code optimization.
4) Supporting recursion in source programs.
5) None of the above
Which of the following are typical compilation stages?
1) Lexical analysis
2) Syntactic analysis
3) Code generation
4) Output analysis
5) Code optimization
6) None of the above
Which of the following compilation stages are responsible for ensuring that the program adheres to the language meaning and that the program is unambiguous?
1) Lexical analysis
2) Syntactic analysis
3) Semantic analysis
4) Code generation
5) Code optimization
6) None of the above
Which of the following compilation stages are responsible for creating code (in another language) that corresponds to the original program?
1) Lexical analysis
2) Syntactic analysis
3) Semantic analysis
4) Code generation
5) Code optimization
6) None of the above
Which of the following compilation stages are responsible for issuing compilation errors in a source program?
1) Lexical analysis
2) Syntactic analysis
3) Semantic analysis
4) Code generation
5) Code optimization
6) None of the above
The complete set of terminals in the following grammar is: [1] ::= "(" ")" [2] | ATOM [3] | NUMBER [4] ::= [5] | "." [6] | epsilon
1) ATOM, NUMBER
2) "(", ")", "."
3) "(", ")", ATOM, NUMBER, "."
4) ,
5) None of the above
Which of the following are parts of a BNF grammar:
1) Start symbol (a non-terminal)
2) Set of terminal symbols
3) Set of production rules
4) Set of regular expressions
5) Set of non-terminal symbols
6) None of the above
Imperative "statements"
1) Cause a change in program state.
2) Are generally more efficient than "declarative" statements.
3) Define new variables, types, and functions.
4) Are more reliable than "declarative" statements.
5) None of the above
Declarative "statements"
1) Cause a change in program state.
2) Are generally more efficient than "imperative" statements.
3) Define new variables, types, and functions.
4) Are more reliable than "imperative" statements.
5) None of the above
Which of the following languages are primarily declarative in nature?
1) Java
2) Cobol
3) Lisp
4) Prolog
5) Fortran
{"name":"Week 3", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Which of the following are not part of the layout of a process in memory?, Why do the heap and run-time stack not have a fixed size (during program execution) like the other parts of the process layout in memory?, Which of the following are true regarding reference counts?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Powered by: Quiz Maker