Compiler Design Solved MCQ 2020-21
BCA 6 semester | HNBGU
Read Also:
-
Users write the programs in which language?
- Low-Level language
- Decimal format
- Middle level language
-
Which computer program accepts the high level language and converts it into assembly language?
- Interpreter
- Linker
- Assembler
-
Does the compiler program translate the whole source code in one step?
- No
- Depends on the compiler
- Don’t know
-
Which of the following files is an output of the assembler?
- Program file
- Data file
- Task file
-
Which tool is used for grouping of characters in tokens in the compiler
- Parser
- Code optimizer
- Code generator
-
What is the linker?
- It is always used before the program execution.
- It is the same as the loader
- None of the above
-
Parsing is categorized into how many types?
- Three types
- Four types
- Five types
-
In which parsing the parser constructs tha parse tree from the start symbol and transforms it into the input symbol?
- Bottom up parsing
- None of the above
- Both (a) and (b)
-
Which derivation is generated by the top down parser?
- Right most derivation in reverse
- Left most derivation in reverse
- Right most derivation
-
Which derivation is generated by the top down parser?
- Left most derivation in reverse
- Right most derivation
- Left most derivation
-
Which parser is most powerful in the following parser
- Operator precedence
- SLR
- LALR
-
The output of the lexical analyzer is
- A syntax tree
- A set of Regular Expression
- A set of tokens
-
From the following grammars, which describes the lexical syntax?
- Context free grammar
- Syntactic grammar
- Regular grammar
-
Which grammar gives multiple parse trees for the same string?
- Unambiguous
- Regular
- All of the above
-
In compiler lexical analyzer is used for:
- Removing comments
- Removing whitespace
- Breaking the syntaxes in the set of tokens
-
Which is considered as the sequence of characters in a token?
- Mexeme
- Texeme
- Pattern
-
Which part of the compiler highly used the grammar concept
- Code optimization
- Code generation
- Lexical analysis
-
Which phase of the compiler checks the grammar of the programming?
- Code optimization
- Semantic analysis
- Code generation
-
Which of the following components is important for semantic analysis?
- Yace
- Lex
- Symbol Table
-
Which phase of the compiler is also known as scanner?
- Syntax analysis
- Semantic analysi
- Code generation
-
Which phase of the compiler is also known as parse?
- Code optimization
- Semantic analysis
- Lexical analysis
-
Which of the following parser is a top down parser
- An LALR parser
- A LR parser
- Operator precedence parser
-
Keywords are recognized in a compiler during
- The code generation
- The data flow analysis
- The program parsing
-
Leaf nodes in a parse tree indicate:
- Sub terminals
- Half terminals
- Non terminals
-
Which graph describes the basic block and successor relationship?
- Control graph
- DAG
- Hamilton graph
-
Which language is accepted by the push down automate?
- Type 0 language
- Type 1 language
- Type 3 language
-
The most general phase of structured grammar is
- Context free grammar
- Regular grammar
- All of the above
-
In the compiler the function of using intermediate code is:
- To improve the register allocation
- To increase the error reporting and recovery
- To make semantic analysis easier
-
In how many types of optimization can be divided?
- 3
- 4
- 5
-
The value of which variable is updated inside the loop by a loop invariant value?
- Loop
- strength
- invariable
-
Which compiler runs on one machine and generates code for multiple machines
- Multipass compiler
- Optimizing compiler
-
Which of the following is not a characteristic of the compiler?
- Debugging process is slow
- The execution takes place after the removal of all syntax errors
- Firstly scans the entire program and then transforms it into machine understandable code
-
Which phenomenon happens when the nonterminal on the left side is repeated as the first symbol on the right side?
- Left most derivation
- Left factoring
- Left parsing
-
In which derivation the right most non terminal symbol is replaced at each step?
- Right look ahead
- Right claim
- Right non terminal
-
In which derivation the leftmost non terminal symbol is replaced at each step?
- Left recursion
- Left non terminal
- Left pushdown