Compiler Construction mcqs
(1)Operator precedence of Assignment operator (=).......
Ans is.
{ Right to left.}
(2)Operator precedence of arithmetic operator (/ ; * ; + ; - ) is
Ans is
{Left to right}
(3)Priority of arithmetic operator is
Ans is
1...()
2..../ *
3...+
4... -
(4)Why we use Lemda symbol in cfg....
Ans is
Terminate the variable/ tree.
(5)What is meant by ( T, S, V ,P) in cfg..
V= VARIABLE.
S= STRING
T= TERMINAL.
P= PTODUCTION.
(6)The process of deriving a string by using given grammar???
Ans is .
Derivation./Parse.
(7)How many tupple of CFG..
Ans is
Four
(8)Why we remove left recursion.
Ans is
Avoid error.
(9)Top down technique does not follow.
Ans is.
Left recursion.
(10)Tree always start from
Ans is
Start symbol "S".
(11)CFG have derivations:
Ans is
Left most derivation (LMD)
Right most derivation (RMD)
(12)How many types of compiler?
Ans is
Two.(2)
(13)How many types of language translator.
Ans is
Three(Compiler, interpreter, Assembler)
(14)compiler Convert the source code into____?.
A. Machine code
B. Executable code
C. Binary code
E. Both A and C
(15) How many numbers of tokens in this statement__.
printf(“b= %d, &b = %x”, b, &b);
A. 11
B. 31
C. 4
D. 10
(16)one or more parse tree for some sentence is called ____grammar.
a) Unambiguous
b) Ambiguous
c) Both A and B
d) None of these
(17) A lexical analyzer produces____?
A. Machine code
B. Binary code
C. tokens
D. Both A and B
(18) The types of the compiler are __.
A. 6
B. 8
C. 2
D. 3
(19) One of the fastest logic is __?.
A. ECL
B. TTL
C. Both A and B
D. None of these
(20) compiler checks the ____error.
A. Syntax error
B. Logical error
C. Run time error
D. All of these
(21)___ is not a phase of compiler.
A. syntax
B. testing
C. lexiacal
D. Both A and C
(22) Parsing is also called____ analysis?
A. semantic
B. lexical
C. syntax
D. Both A and B
(23) A string of tokens is generated by___.
A. Parsing
B. Analysing
C. Translating
D. All of these
No comments:
Post a Comment