Hello and welcome to exampundit. Here is a set of IBPS SO IT Officer Professional Knowledge Quiz on Data Structure/Compiler Design.
- Linked lists are suitable for which of the following problems?
(a) Insertion sort
(b) Binary search
(c) Radix sort
(d) Polynomial manipulation
(e) None of these
- The lexical analysis for a modern computer language such as Java needs the power of which one of the following machine models in a necessary and sufficient sense?
(a) Finite state automata
(b) Deterministic push down automata
(c) Non-deterministic push down automata
(d) Turing machine
(e) None of these
- In a compiler, keyboards of a language are recognized during
(a) parsing of the program
(b) the code generation
(c) the lexical analysis of the program
(d) data flow analysis
(e) None of these
- Which data structure in a compiler is used for managing information about variables and their attributes?
(a) Abstract syntax-tree
(b) Symbol table
(c) Semantic stack
(d) Parser table
(e) None of these
- Which of the following statements are true?
1. There exist parsing algorithms for some programming languages whose complexities are less than θ (n3).
2. A programming language which allows recursive can be implemented with static storage allocation.
3. No L-attributed definition can be evaluated in the framework of bottom-up parsing.
4. Code improving transformations can be performed at both source language and intermediate code level.
(a) 1 and 2
(b) 1 and 4
(c) 3 and 4
(d) 1, 3 and 4
(e) None of these
- Some code optimizations are carried out on the intermediate code because
(a) they enhance the portability of the compiler to other target processors
(b) program analysis is more accurate on intermediate code than on machine code
(c) the information from data flow analysis cannot be used for optimization
(d) the information from the front end cannot be used for optimization
(e) None of these
- Which of the following are true?
1) A programming language which does not permit global variables of any kind and has no nesting of procedures/functions, but permits recursive can be implemented with static storage allocation
2) Multi-level access link (or display) arrangement is needed to arrange activation records only, if the programming language being implemented has nesting of procedures/functions.
3) Recursion in programming languages cannot be implemented with dynamic storage allocation
4) Nesting of procedures/functions and recursion require a dynamic heap allocation scheme and cannot be implemented with a stack-based allocation scheme for activation records.
5) Programming languages which permit a function to return a function as its result cannot be implemented with a stack based storage allocation scheme for activation records
(a) 2 and 5
(b) 1, 3 and 4
(c) 1, 2 and 5
(d) 2, 3 and 5
(e) None of these
- Which one of the following is a top-down parser?
(a) Recursive descent parser
(b) Operator precedence parser
(c) An LR (k) parser
(d) An LALR (k) parser
(e) None of these
- The grammar A → AA | (A) | is not suitable for predictive parsing because the grammar is
(a) ambiguous
(b) left-recursive
(c) right-recursive
(d) an operator grammar
(e) None of these
- Consider the grammar S → (S) | a
Let the number of states in SLR (1), LR(1) and LALR (1) parsers for the grammar be n1, n2 and n3 respectively. Which of the following relationships holds good?
(a) n1 < n2 < n3
(b) n1 = n3 < n2
(c) n1 = n2 = n3
(b) n1 ≥ n3 ≥ n2
(e) None of these