1. Which of the following statement is true about Two-pass compiler.
- Front End depends upon Back End
- Back End depends upon Front End ✔
- Both are independent of each other
- None
2. In a three-pass compiler, ___ is used for code improvement or optimization.
- Front End
- Middle End ✔
- Back End
- Both Front End and Back End
3. In multi-pass compiler during the first pass, it gathers information about ___
- Declaration ✔
- Bindings
- Static information
- None
4. Which of the statement is true about Regular Languages?
- Regular Languages are the most popular for specifying tokens.
- Regular Languages are based on simple and useful theory.
- Regular Languages are easy to understand
- All of the given ✔
5. The DFA uses its state to keep track of ___ the NFA can be in after reading each input symbol.
- Accept state
- Reject state
- Next state
- All possible states ✔
6. In ___ certain check are performed to ensure that components of a program fit together meaningfully.
- Linear analysis
- Hierarchical analysis
- Semantic analysis ✔
- None
7. Compilers are some times classifies as:
- Single-pass
- Multipass
- Load and go
- All of the given ✔
8. In compiler, linear analysis is also called
- Lexical analysis
- Scanning
- Both lexical analysis and scanning ✔
- None
9. In a transition table cells of the table contain the ___ state.
- Reject state
- Next state ✔
- Previous state
- None
10. In Back End module of the compiler, optimal register allocation uses ___.
- O(log n)
- O(n log n)
- NP-Complete ✔
- None
11. A non-recursive predictive parser is also called ___
- table-driven parser ✔
- Abstract parser
- Conceptual parser
- None
12. The shift action ___ a terminal on the stack
- Pushes ✔
- Pops
- Both pushes and pops
- None
13. Bottom-up parsing is also called ___
- LR parsing ✔
- LT parsing
- LS parsing
- SS parsing
14. ___ of a two-pass compiler is consists of instruction selection, Register allocation and instrcution scheduling
- Backend ✔
- Frontend
- Start
- None
15. Consider the grammar
A -> B C C
B -> h B | epsilon
C -> C g | g | C h | i
D -> A B | epsilon
First of A is ___
- h, g, i
- g
- h ✔
- None
16. A -> B C C
B -> h B | epsilon
C -> C g | g | C h | i
- h, $
- $
- i
- g
B -> h B | epsilon
C -> C g | g | C h | i
D -> A B | epsilon
Follow of C is ___
- g, h, i, $ ✔
- g, h, $
- h, i, $
- h, g, $
18. Left factoring of grammar is done to save the parser from backtracking.
- True ✔
- False
19. Typical compilation means programs written in high-level languages to low-level ___
- Object code
- Byte code
- Unicode
- Object code and byte code ✔
- Parsing
- Syntax
- Parsing and Syntax analysis ✔
- None
- Registers ✔
- Memory
- Hard disk
- None
- Linker
- Token ✔
- Control flow
- None
- Linker
- Token ✔
- Instructions
- None
- DFA ✔
- NFA
- PDA
- None
- State ✔
- NFA
- PDA
- None
26. ___ (lexical Analyzer generator), is written in Java
- Flex
- Jlex ✔
- Complex
- None
- %% ✔
- &&
- ##
- None
- Descent y✔
- Ascent
- Forward
- None
- Input ✔
- Output
- Input and Output
- None
- Binary Search Tree
- Parse tree ✔
- Binary Search and Parse tree
- None
- Terminals
- Both non-terminals and terminals
- Non-terminals ✔
- None
- Stack ✔
- Link list
- Array
- None
- g, i ✔
- g
- h, i
- None
- Two ✔
- Three
- Four
- Five
- Pushes
- Pops ✔
- Both push and pops
- None
- O(n)
- O(n log n)
- NP complete ✔
- None
- Instruction selection ✔
- Register allocation
- Instruction scheduling
- All of given
- aa*
- (aa)* ✔
- aa*a
- a(aa)*
- Jame’s
- Robert’s
- Hopcroft’s y✔
- None
- Code checking
- Type checking ✔
- Flush checking
- None
- h, i
- h, epsilon ✔
- g
- None
- h, g
- h
- h, g, i, epsilon ✔
- None
- LS
- LT
- LR ✔
- LP
- Lexical analyzer ✔
- Parser
- Symbol table
- None
- a*
- (a*| b*)*
- (a*b*)*
- (a|b)(a|b) ✔
- Command
- Expression ✔
- Declaration
- None
- Large ✔
- Small
- Medium
- None
- Left-recursive ✔
- File-recursive
- End-recursive
- Start-recursive
- Assembler
- Loader/link-editor ✔
- Compiler
- Preprocessor
- h ✔
- g, h, i, $
- g, i
- g
- :=
- =
- <> ✔
- None
- Register allocation
- Instruction scheduling ✔
- Instruction selection
- None
- True ✔
- False
- Instruction selection ✔
- Register allocation
- Instruction scheduling
- None
- Single pass
- Multi pass
- Load and go
- All of given ✔
- True
- False ✔
- True ✔
- False
- True
- False ✔
- Source code ✔
- Intermediate Representation (IR)
- Machine code
- None
- True
- False ✔
- Removing left recurrence
- Applying left factoring
- Removing left recurrence and Applying left factoring ✔
- None
- True
- False
- True
- False ✔
- Semantic
- Syntax
- Preprocessing ✔
- None
- Abstract syntax ✔
- Concrete syntax
- Parse
- None
66. Ambiguity can easily be handled by top-down parser
- True ✔
- False
- Reduces ✔
- Shifts
- Adds
- None
- Left-to-right scan of input
- left-most derivation
- All of the given ✔
- None
- Yes ✔
- No
- Sometimes
- Depend upon NFA
- {0}
- {0, 1}
- {0, 1, 2}
- {0, 1, 2, 3} ✔
- Removing white space
- Removing constants, identifiers and keywords
- Removing comments
- All of given ✔
- NFA to DFA ✔
- DFA
- DFA maximization
- None
- garbage collection
- memory management
- run time error checking
- None ✔
- modified
- translate ✔
- execute
- extract
- True
- False ✔
- True
- False ✔
- True
- False ✔
- True ✔
- False