Time Left - 45:00 mins

GATE 2022: Compiler Design Quiz-11

Attempt now to get your rank among 304 students!

Question 1

A program that can execute high-level language programs.

Question 2

Which of these is not true about Symbol Table?

Question 3

Find the language generated by the following grammar: 
{S → AB, A → aA|a, B → bB|b}

Question 4

Which of the following statement is/are true in the context of interpreters?

S1 : Interpreters   process   program according to the logical flow of control through the program.

S2 : Interpreter translates and executes the error-free first instruction before it goes to the second.

S3 : Interpreter processing time is less compared with compiler.

S4 :  LISP and Prolog are interpreted languages.

Question 5

Categorize each of the following errors into syntactic error/lexical error/static semantic error.

A) Redeclaration of an identifier.

B) Unbalanced parenthesis.

C) Array index out of bounds.

D) Divide by

E) Mistype the constant integer “Count12” as “Count 12”.

F) Dereference of null pointer.

G) Use of uninitialized variable.

Let the number of Syntactic error from the above list be x, number of lexical errors from the above list be y and the number of static semantic errors be z. Then x-(y+z) = ____

Question 6

Consider the following CFG.

How many states in SLR (1) parsing construction?

Question 7

Which of the following are language processors?

Question 8

Consider the following sets:

A = Set of all LL (1) grammars

B = Set of all LR (0) grammars

C = Set of all LL (0) grammars

D = Set of all LR (1) grammars

Which of the following is correct?

Question 9

Consider the following grammar -
S -> ABa/BAc
A -> d/e/epsilon
B -> f/epsilon
Which of the following is true regarding the FIRST() & FOLLOW() function of LL(1) parser?

Question 10

The grammar which is equivalent to -
A -> A+A/A-A/B
B -> B*B/B -B
After eliminating the left factoring is -

Question 11

Find the number of tokens in the following C program-
int main() {
char 2ac/d;
int b;

Question 12

Count number of tokens in the following given code :

Question 13

Find the expression which is represented by the following DAG (Directed Acyclic Graph)?

Question 14

Which of the following is not the property of the basic block in control flow graph?

Question 15

The least number of temporary variables required to create a three-address code in static single assignment form for the expression q + r / 3 + st * 5 + u * v /wis _____________.
  • 304 attempts