Explore topic-wise MCQs in Compilers.

This section includes 3 Mcqs, each offering curated multiple-choice questions to sharpen your Compilers knowledge and support exam preparation. Choose a topic below to get started.

1.

Assume that the SLR parser for a grammar G has n1 states and the LALR parser for G has n2 states.

A. n1 is necessarily less than n2
B. n1 is necessarily equal to n2
C. n1 is necessarily greater than n2
D. none of the mentioned
Answer» C. n1 is necessarily greater than n2
2.

Compute E.value for the root of the parse tree for the expression:2 # 3 & 5 # 6 &4.

A. 200
B. 180
C. 160
D. 40
Answer» D. 40
3.

The process of assigning load addresses to the various parts of the program and adjusting the code and data in the program to reflect the assigned addresses is called?

A. Assembly
B. Parsing
C. Relocation
D. Symbol resolute
Answer» D. Symbol resolute