MCQ Mojo
access_time
menu
Quiz
Web Stories
CBSE
arrow_drop_down
MCQ Questions for CBSE Class 12 with Answers
MCQ Questions for CBSE Class 11 with Answers
MCQ Questions for CBSE Class 10 with Answers
MCQ Questions for CBSE Class 9 with Answers
MCQ Questions for CBSE Class 8 with Answers
MCQ Questions for CBSE Class 7 with Answers
MCQ Questions for CBSE Class 6 with Answers
MCQ Questions for CBSE Class 5 with Answers
MCQ Questions for CBSE Class 4 with Answers
MCQ Questions for CBSE Class 3 with Answers
MCQ Questions for CBSE Class 2 with Answers
MCQ Questions for CBSE Class 1 with Answers
CBSE
arrow_drop_down
MCQ Questions for CBSE Class 12 with Answers
MCQ Questions for CBSE Class 11 with Answers
MCQ Questions for CBSE Class 10 with Answers
MCQ Questions for CBSE Class 9 with Answers
MCQ Questions for CBSE Class 8 with Answers
MCQ Questions for CBSE Class 7 with Answers
MCQ Questions for CBSE Class 6 with Answers
MCQ Questions for CBSE Class 5 with Answers
MCQ Questions for CBSE Class 4 with Answers
MCQ Questions for CBSE Class 3 with Answers
MCQ Questions for CBSE Class 2 with Answers
MCQ Questions for CBSE Class 1 with Answers
Quiz
Quiz
/
Compiler Design Gate & PSU MCQ Questions With Answers
1.
How many lexemes are present in the following line of code?int max = 4 > 3 ? 0 : 1; /*yes*/
11
10
12
14
2.
It is a computer program that links and merges various object files together in order to make an executable file.
Assembler
Compiler
Linker
Loader
3.
A parse tree for __________ can be always annotated by evaluating semantic rules for attributes at each node bottom up
S-attributed
Inherited attributes
Both a and b
Syntax directed definition
4.
What is the output of lexical analyzer?
A parse tree
A list of tokens
Intermediate code
Machine code
5.
Which among the following looks similar to the given expression?((0+1). (0+1)) *
{xϵ {0,1} *|x is all binary number with even length}
{xϵ {0,1} |x is all binary number with even length}
{xϵ {0,1} *|x is all binary number with odd length}
{xϵ {0,1} |x is all binary number with odd length}
6.
Let S and T be language over ={a,b} represented by the regular expressions (a+b*)* and (a+b)*, respectively. Which of the following is true?
S⊂TS\subset TS⊂T
T⊂ST\subset ST⊂S
S=TS=TS=T
S∩T≡ϕS\cap T\equiv\phiS∩T≡ϕ
7.
Select a Machine Independent phase of the compiler
Syntax Analysis
Intermediate Code generation
Lexical Analysis
All of the mentioned
8.
Compilers, assemblers and interpreters are examples of this.
Translator
Run time environment
Editor
Error diagnostics
9.
This phase scans the source code as a stream of characters and converts it into meaningful lexemes.
Lexical Analyzer
Syntax Analyzer
Semantic Analyzer
Code Generator
10.
LR(1) item=___________ + ______________
LR(0) item + First(S')
LR(0) item + Action
LR(0) item + Lookahead
LR(0) item + Follow(S')
11.
It explains what can be a token, and these are defined by means of regular expressions.
Lexemes
Tokens
Symbols
Pattern
12.
The regular expression (0|1)*(0|1) represents a language with
Odd nonempty strings
Even nonempty strings
Empty and nonempty binary strings
Nonempty binary strings
13.
When there is a reduce/reduce conflict?
If a state does not know whether it will make a shift operation using the production rule i or j for a terminal
If a state does not know whether it will make a shift or reduction operation using the production rule i or j for a terminal
If a state does not know whether it will make a reduction operation using the production rule i or j for a terminal
None of the mentioned
14.
The non- Kleene Star operation accepts the following string of finite length over set A = {0,1} | where string s contains even number of 0 and 1
01,0011,010101
0011,11001100
ε,0011,11001100
ε,0011,11001100
15.
A grammar is a ___
triple
quadruple
quintuple
None of these
16.
In parser the two LL stand(s) for ____________.
Left-to-right scan of input
left-most derivation
both 1 and 2
none of the above
17.
Consider the regular expression 0 * (10 *) which is similar to the same set as
0 + (0 + 10) *
(0 +1) * 10 (0 + 1) *
(1 * 0) * 1*
None of the above
18.
In programming language, keywords, constants, identifiers, strings, numbers, operators and punctuations symbols can be considered as?
Lexemes
Tokens
Symbols
Pattern
19.
A program that converts the assembly language to machine-level language.
Assembler
Compiler
Interpreter
LInker
20.
In SLR parsing for the grammar E’-->E , E--> aEbE|bEaE|ε, In state 0, for inputs ‘a’ and ‘b’
Both will have shift-reduce conflict
Only ‘a’ will have shift-reduce conflict
Only ‘b’ will have shift-reduce conflict
Neither of the other option
21.
In LL(1) parsing the production A->W is placed in __________
Select(A->W)=First(follow(A)First(W))
Select(A->W)=Follow(follow(A)First(W))
Select(A->W)=First(First(W) follow(A))
Select(A->W)=First(Follow(W) follow(A))
22.
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
23.
Transition function of DFA maps
Σ * Q -> Σ
Q * Q -> Σ
Σ * Σ -> Q
Q * Σ -> Q
24.
Left factoring eliminates ___
Ambiguity
Recursion
Determinism
Non-determinism
25.
It is known as the front-end of the compiler.
Analysis Phase
Synthesis
26.
For the given grammar G:S->ABaCA->BCB->b| \epsilonϵ C->D| \epsilonϵ D-> d
6
7
5
8
Report Question
Previous
Next
warning
Submit
access_time
Time
Report Question
A bunch of text
Support mcqmojo.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page