MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
Computer Science
Compiler Design
Quiz 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Q.1
DAG means
Directed Acyclic Graph
Deterministic Acyclic graph
Directed Automated Graph
Deterministic Automated graph
Q.2
What is the output of lexical analyzer?
A parse tree
A list of tokens
Intermediate code
Machine code
Q.3
LR stands for
left to right scanning
left to right reduction
leftmost to rightmost derivation
left to right scanning and right most derivation in reverse
Q.4
What is machine code?
Instructions and data in binary
Serial number of the CPU
Instructions and data in human readable form
Instructions and data in assembly code mnemonics
Q.5
Which one of the following statements is FALSE ?
Context-free grammar can be used to specify both lexical and syntax rules.
Type checking is done before parsing.
High-level language programs can be translated to different Intermediate Representations.
Both A & B
Q.6
One of the purposes of using intermediate code in compilers is to
make parsing and semantic analysis simpler
improve error recovery and error reporting
improve the register allocation
increase the chances of reusing the machine-independent code optimizer in other compilers
Q.7
Which one of the following is FALSE?
A basic block is a sequence of instructions where control enters the sequence at the beginning and exits at the end
Available expression analysis can be used for common subexpression elimination
Live variable analysis can be used for dead code elimination
x = 4 ∗ 5 => x = 20 is an example of common subexpression elimination
Q.8
Some code optimizations are carried out on the intermediate code because
the information from the front end cannot otherwise be used for optimization
program analysis is more accurate on intermediate code than on machine code
the information from dataflow analysis cannot otherwise be used for optimization
they enhance the portability of the compiler to other target processors
Q.9
An optimizing Compiler?
Is optimized to occupy less space
Optimizes the code
Is optimized to take less time for execution
All of above
Q.10
Consider the regular expression 0 * (*) which is similar to the same set as
0 + (0 + 10) *
(0 +1) * 10 (0 + 1) *
(1 * 0) * 1*
None of the above
Q.11
A grammar for a programming language is a formal description of
Structure
Syntax
Semantics
Code
Q.12
Syntax directed translation scheme is desirable because
it is based on the syntax
its description is independent of any implementation
it is easy to modify
all of these
Q.13
What does a Syntactic Analyser do?
Maintain Symbol Table
Collect type of information
Create parse tree
None of the mentioned
Q.14
Which of these is not a stage in the compilation process:
LEXICAL ANALYSIS
CODE OPTIMISATION
OBJECT CODE GENERATION
SOURCE CODE GENERATION
Q.15
A compiler is a
Translator
System Software
Above 2
Inerpreter
Q.16
Removal of left recursion is necessary because?
It causes recursive decent parser to loop forever
It generates an ambiguous grammar
Both a and b
None of these
Q.17
The role of predictive parsing is
To construct a top-down parser that never backtracks
To construct a top-down parser that backtracks
To construct a bottom-up parser that never backtracks
All of above
Q.18
In context to the process of removing useless symbols, which of the following is correct?
We remove the Nullable variables
We eliminate the unit productions
We eliminate products which yield no terminals/strings
All of the mentioned
Q.19
A system program that set-up an executable program in main memory ready for execution is
loader
linker
assembler
None of the above
Q.20
Compilers, assemblers and interpreters are examples of this.
Translator
Run time environment
Editor
Error diagnostics
0 h : 0 m : 1 s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)
Support mcqgeeks.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page