github

Made bySaurav Hathi

CSE - Mock Test - 14

Q1:

In a bottom-up evaluation of a syntax directed definition its inherited attributes can do which of the following?

Tags:
Section:
Compiler Design
Options:
Q2:

Terminal table

Tags:
Section:
Compiler Design
Options:
Q3:

Which of the following identity is true?

Tags:
Section:
Compiler Design
Options:
Q4:

Which one of the following is a top-down parser?

Tags:
Section:
Compiler Design
Options:
Q5:

Consider the following grammar

S → FR

R → * S | ε

F → id

In the predictive parser table, M, of the grammar the entries M [S, id] and M [R, $] respectively

Tags:
Section:
Compiler Design
Options:
Q6:

Consider the following grammar.

S → S * E

 S → E

E → F + E

E → F

F → id

Consider the following LR (0) items corresponding to the grammar above.

(i) S → S * .E

(ii) E → F. + E

(iii) E “F + .E

Given the items above, which two of them will appear in the same set in the canonical sets-of-items for the grammar?

Tags:
Section:
Compiler Design
Options:
Q7:

Consider the grammar defined by the following production rules

S → T * P

T → U | T * U

P → Q + P | Q

Q → Id

U → Id

Which one of the following is TRUE?

Tags:
Section:
Compiler Design
Options:
Q8:

Which of the following suffices to convert an arbitrary CFG to an LL(1) grammar?

Tags:
Section:
Compiler Design
Options:
Q9:

Which grammar rules violate the requirements of an operator grammar ?

1. P → Q R

2. P → Q s R

3. P → ε

4. P → Q t R r

Tags:
Section:
Compiler Design
Options:
Q10:

Consider the following grammar G.

S → F|H

F → p|c

H → d|c

Which one is true?

S1: All strings generated by G can be parsed with help of LL (1).

S2: All strings generated by G can be parsed with help of LR (1).

Tags:
Section:
Compiler Design
Options:
Q11:

Which of the following pairs is the most powerful?

Tags:
Section:
Compiler Design
Options:
Q12:

Match the following:

List-I

List-II

A. Lexical analysis

1. Graph coloring

B. Parsing

2. DFA minimization

C. Register allocation

3. Post-order traversal

D. Expression evaluation

4. Production tree

 

Tags:
Section:
Compiler Design
Options:
Q13:

Which of the following is used for grouping of characters into tokens?

Tags:
Section:
Compiler Design
Options:
Q14:

The output of lexical analyzer is

Tags:
Section:
Compiler Design
Options:
Q15:

Which of these features of assembler are Machine-Dependent

Tags:
Section:
Compiler Design
Options:
Q16:

Output file of the Lex is _________ is the input file is Sam.

Tags:
Section:
Compiler Design
Options:
Q17:

Pick the machine independent phase of the compiler

Tags:
Section:
Compiler Design
Options:
Q18:

System program such a s compiler are designed so that they are

Tags:
Section:
Compiler Design
Options:
Q19:

Advantage of incorporating the macro-processor into pass 1 is that

Tags:
Section:
Compiler Design
Options:
Q20:

An optimizer Compiler

Tags:
Section:
Compiler Design
Options: