300+ TOP Compiler Design MCQs and Answers Quiz Exam 2023
300+ TOP Compiler Design MCQs and Answers Quiz Exam 2023
HOME Interview Questions MCQs Class Notes *LAB VIVA SEMINAR TOPICS
ONLINE TEST GATE CAT Internship ABOUT US
https://engineeringinterviewquestions.com/compiler-design-multiple-choice-questions-answers/ 1/21
11/11/23, 5:15 PM 300+ TOP Compiler Design MCQs and Answers Quiz Exam 2023
A. P->Q R
B. P->Q s R
C. P->ε
D. P->Q t R r
A. a and c only
B. b and c only
C. a and d only
D. a only
A. 2n – 1
B. 2n
C. n-1
D. n/2
Answer: 2n – 1
The processor allows only register operands in its instructions and the
given code segment is executed in that processor. For each instruction
https://engineeringinterviewquestions.com/compiler-design-multiple-choice-questions-answers/ 3/21
11/11/23, 5:15 PM 300+ TOP Compiler Design MCQs and Answers Quiz Exam 2023
operand is available. Assume that all the variables are dead after this
code segment.
z = x + y;
p = z * x;
q = c + x;
j = z * z;
If (j > x)
{
M = x*x;
}
else
{
p = p*p;
q = q*q;
}
A. 0
B. 1
C. 2
D. 3
Answer: 1
A. 3
B. 6
C. 4
D. 5
Answer: 4
A. n, n + n and n + n x n
B. n, E + n and E x n
C. n, E + n and E + E x n
D. n, E + n and E + n x n
Answer: n, E + n and E x n
B. Cannot be merged but will result in R-R conflict
https://engineeringinterviewquestions.com/compiler-design-multiple-choice-questions-answers/ 6/21
11/11/23, 5:15 PM 300+ TOP Compiler Design MCQs and Answers Quiz Exam 2023
13)A. Begin
B. Program
C. <>
A. b
B. c
C. a
D. All of the above
Answer: c
A. 11231
B. 11233
C. 23131
D. 33211
Answer: 23131
https://engineeringinterviewquestions.com/compiler-design-multiple-choice-questions-answers/ 7/21
11/11/23, 5:15 PM 300+ TOP Compiler Design MCQs and Answers Quiz Exam 2023
A. (L.D)*
B. (L + D)*
C. L (L.D)
D. L (L + D)*
Answer: L (L + D)*
17) The activities are listed below. What is the pass numbers
of each of the activities respectively?
A. Object code generation
B. Literals added to the literal table
https://engineeringinterviewquestions.com/compiler-design-multiple-choice-questions-answers/ 8/21
11/11/23, 5:15 PM 300+ TOP Compiler Design MCQs and Answers Quiz Exam 2023
C. Listing printed
D. Address resolution of local symbols that occur in a two pass
assembler
A. 1, 2, 2, 2
B. 2, 1, 1, 1
C. 1, 2, 1, 2
D. 2, 1, 2, 1
Answer: 2, 1, 2, 1
M(j + k);
}
A. 25, 220
B. 115, 105
C. 220, 115
D. 105, 220
A. 105, 25
B. 105, 115
C. 220, 25
D. 115, 220
21) ______________ is not an advantage of using shared,
dynamically linked libraries as opposed to using statically
https://engineeringinterviewquestions.com/compiler-design-multiple-choice-questions-answers/ 10/21
11/11/23, 5:15 PM 300+ TOP Compiler Design MCQs and Answers Quiz Exam 2023
linked libraries.
T1 = a + b
T2 = c + d
T3 = e – T2
T4 = T1 – T3
A. 3
B. 2
https://engineeringinterviewquestions.com/compiler-design-multiple-choice-questions-answers/ 11/21
11/11/23, 5:15 PM 300+ TOP Compiler Design MCQs and Answers Quiz Exam 2023
C. 6
D. 4
Answer: 3
A. S->aS\Sb\a\b
B. S->AC\CB
C->aC b\a\b
A->aA\ ∈
B->Bb\ ∈
C. S->AC\CB
C->aCb\∈
A->aA\a
B->bB\b
D. S->AC\CB
C->aC b\∈
A->aA\ ∈
B->Bb\ ∈
Answer: S->AC\CB
C->aCb\∈
A->aA\a
B->bB\b
A. max (l, m) + 3
B. max (l, m) + 2
C. l + m + 2
D. l + m + 3
https://engineeringinterviewquestions.com/compiler-design-multiple-choice-questions-answers/ 12/21
11/11/23, 5:15 PM 300+ TOP Compiler Design MCQs and Answers Quiz Exam 2023
S->FR
R->*E{print(‘*’);R\ε
E->F + E{print (‘+’);\F
F->(S)\id {print (iD.value);}
is ‘2 * 3 + 4’?
A. 2 3 * 4 +
B. 2 3 4 + *
C. 2 * + 3 4
D. 2 * 3 + 4
Answer: 2 3 4 + *
https://engineeringinterviewquestions.com/compiler-design-multiple-choice-questions-answers/ 13/21
11/11/23, 5:15 PM 300+ TOP Compiler Design MCQs and Answers Quiz Exam 2023
A. 50
B. 100
C. 200
D. 160
Answer: 160
E->E*F I F+E I F
F->F – I id
A. Inherited attributes can always be evaluated
B. Inherited attributes can never be evaluated
https://engineeringinterviewquestions.com/compiler-design-multiple-choice-questions-answers/ 14/21
11/11/23, 5:15 PM 300+ TOP Compiler Design MCQs and Answers Quiz Exam 2023
A. aabbbb
B. abbbba
C. aabbab
D. aaaabb
Answer: aabbab
A. 4
B. 1
C. 3
D. 2
Answer: 2
https://engineeringinterviewquestions.com/compiler-design-multiple-choice-questions-answers/ 15/21
11/11/23, 5:15 PM 300+ TOP Compiler Design MCQs and Answers Quiz Exam 2023
A. n1 = n2
B. n1 < n2 C. n1 > n2
D. None of the above
Answer: n1 = n2
resolved if M1 contains reference to a function defined in
M2?
https://engineeringinterviewquestions.com/compiler-design-multiple-choice-questions-answers/ 16/21
11/11/23, 5:15 PM 300+ TOP Compiler Design MCQs and Answers Quiz Exam 2023
A. Edit time
B. Load time
C. Compile time
D. Link time
A. 4
B. 5
C. 9
D. 10
Answer: 10
A. Rightmost derivation
B. Leftmost derivation
C. Rightmost derivation that is traced out in reverse
D. Leftmost derivation that is traced out in reverse
40) S->S*E
S->E
E->F+E
E->F
F->Id
Corresponding to the above grammar, we have following LR
(0) items.
A. S->S*E
B. E->F.+E
C. E->F+.E
The two items that will appear in the same set in the canonical sets-of-
items for the grammar is
A. a and c
B. a and b
C. b and c
D. a, b and c
Answer: a and c
A. Semantic stack
B. Parser table
C. Symbol table
D. Abstract syntax-tree
A. Turing machine
B. Non-deterministic push down automata
C. Deterministic push down automata
D. Finite state automata
LEAVE A REPLY
Your email address will not be published. Required fields are marked *
Comment *
Name *
Email *
Website
https://engineeringinterviewquestions.com/compiler-design-multiple-choice-questions-answers/ 20/21
11/11/23, 5:15 PM 300+ TOP Compiler Design MCQs and Answers Quiz Exam 2023
Post Comment
Engineering 2023 , Multiple Choice Questions and Answers for Engineering & Medical , Theme by Engineering|| Privacy
Policy|| Terms and Conditions|| ABOUT US|| Contact US||
Engineering interview questions,Mcqs,Objective Questions,Class Lecture Notes,Seminor topics,Lab Viva Pdf PPT Doc Book
free download. Most Asked Technical Basic CIVIL | Mechanical | CSE | EEE | ECE | IT | Chemical | Medical MBBS Jobs
Online Quiz Tests for Freshers Experienced .
https://engineeringinterviewquestions.com/compiler-design-multiple-choice-questions-answers/ 21/21