Time Left - 30:00 mins

GATE CS 2021 : National champion Quiz-4 (App update required to attempt this test)

Attempt now to get your rank among 237 students!

Question 1

Consider the following production rules:

The output of 2 * 4 # 7 # 1 * 5 # 2 * 8 # 3 expression is ________.

Question 2

Consider the following SDT:

What is the missing translation (1) and (2), if the string “2 × 3 + 5 × 3 + 1 × 3” produces 160 instead of 24?

Question 3

Given the following attribute grammar:

E → TE’             E’.y = E.x

                        E.x = E’.y

E1’ → + TE2’      E2’.y = E1’.y + T.x

                        E1’.x = E2’.x

Which of the following is true?

Question 4

Which of the following is correct about self-relocating program?

Question 5

Consider the following statements:

I. Pointer variables are allocated on the stack.

II. Optimal use of registers in the code generation is NP complete and possibly intractable.

III. LEX compiler transforms the input patterns into a transition diagram and generates code in a file.

IV. YACC is a representation of an LALR parser written in C.

The number of correct statements is:

Question 6

Consider the following statements:

A) Static allocation bindings do not changes at run time

B) Heap allocation allocates and de-allocates storage at run time.

C) Recursion in programming languages cannot be implemented with dynamic storage allocation.

How many of the above statements are false?

Question 7

Let M be a finite automaton. Let M′ denote the machine obtained by interchanging the initial and final states in the machine M.

I. L(M) L(M’) =

II. L(M)  L(M’) =

What is the validity of the above statements with respect to DFAs and NFAs?

Question 8Multiple Correct Options

A Language is said to be regular iff- (Multi Select Question)

Question 9

The number of states in the minimal DFA of the set of strings over {0, 1} in which first 3 symbols are same, is ________.

Question 10Multiple Correct Options

Which of the following is a valid description of the input alphabet set  ? (Multi Select Question)

Question 11Multiple Correct Options

Consider the following Problems:

P1: {<M, x, k> | M is a TM and M does not halt on x with in k steps}

P2: {<M> | M is a TM and. M accepts atleast two strings of different length}

P3 : {<M> | M is a TM and there exist an input whose length is less than 100, on which M halts}

The problem which is/are RE but not REC is _______.(Multiple Select Question)

Question 12

Consider the following language:

L1 = {<M> |M is TM, M0 is TM that halts on all inputs, and M ϵ L(M0)}

L2 = {<M>} | M is TM, M0is TM that halts on all inputs, and M0ϵ L(M)}

Which of the following is correct above languages?

  • 237 attempts
  • 1 upvote
  • 5 comments
Apr 8GATE & PSU CS