File - UGC Tutorials

advertisement
System Design and Compiler SET A
1. Which of these is not true about Symbol Table?
a. All the labels of the instructions are symbols.
b. Table has entry for symbol name address value.
c. Perform the processing of the assembler directives.
d. created during pass 1
2. What are the activities of pass-I of multi-pass assembler ?
a. Assign addresses to all the statements.
b. Save the addresses assigned to all labels to be used in Pass-2.
c. Defines the symbols in the symbol table(generate the symbol table).
d. All of the above.
3. Which of these is not an activity done in Pass-2 of multi-pass assembler
a. Assign addresses to all the labels.
b. Assemble the instructions (translating operation codes and looking up addresses).
c. Perform the processing of the assembler directives not done during pass-1.
d. Write the object program and assembler listing.
4. Which of these features of assembler are Machine-Dependent
a. Instruction formats.
b. addressing modes.
c. Program relocation.
d. All of the Above.
5. Which of these is most frequently accessed table
a. OPTAB
b. SYMTAB
c. LITTAB
d. None of the above
6. What are the drawbacks of top down parsing of backtracking: (i) (ii)
a. Semantic actions cannot be performed while making a prediction. The actions must be delayed until the
prediction is known to be a part of a successful parse.
b. Precise error reporting is not possible. A mismatch merely triggers backtracking. A source string is known to be
erroneous only after all predictions have failed
c. Both a and b
d. Either a or b
7. Which of these are type of statements used in an assembly program
a. Imperative statements
b. Declaration statements
c. Assembler directives
d. All of the above
8. If the source program is retained in the source form all through its interpretation, the type of interpreter is called
a. Pure Interpreter
b. Impure Interpreter
c. Lexical Interpreter
d. None of the above
9. Which precess is used to generate an assembly statement from a model statement.
a. Lexical Translation
b. Symbol generation
c. Lexical substitution
d. Symbol Translation
10. An object module is an example of
a. non- relocatable program
b. relocatable program
c. self-relocating program
d. None of the above
1
System Design and Compiler SET A
11. The output from YACC is
a. LALR parser
b. LLLR parser
c. LLAR parser
d. LRLR parser
12. If a parser attempts to derive a string identical to it by successive application of grammar rules to the grammar’s
distinguished symbol, it is called.
a. Top-down parser.
b. Bottom-up Parser.
c. Linear Parser.
d. Non-linear Parser.
13. Which of these are Language Processing activities:
a. Program generation activities.
b. Program execution activities.
c. None of Above.
d. Both a and b
14. Which of these are Code optimizing transformations
a. Dead code elimination
b. Elimination of common subexpressions
c. Run time evaluation
d. Frequency and strength reduction
15. Scanner is the part of the compiler that performs following tasks except
a. scanning the source statement
b. recognizing and classifying the various tokens
c. Elimination of common subexpressions
d. Only a and b
16. Macro definitions are typically located at the start of a program. It consists of all but
a. A macro prototype statement
b. One or more model statements
c. Expansion of Macro
d. Macro preprocessor
17. ORG is an assembler directive that does following
a. Reset the location counter to the specified value-ORG value
b. Value can be: constant, other symbol, expression
c. Directly assign values to symbols
d. No forward reference
18. Synthesis Phase of the compiler does :
a. Intermediate Code Generation
b. Code Optimization
c. Code Generation
d. All of the above
19. A grammar for a programming language is a formal description of
a. Syntax
b. Semantics
c. Structure
d. library
20. Resolution of externally defined symbols is performed by
a. Linker
b. Loader
c. Compiler
d. Interpreter
1-c
2-d
3-a
4-d
5-b
6-c
7-d
8-a
9-c
11-a
12-a
13-d
14-c
15-d
16-c
17-c
18-d
19-c
20-a
2
Download