Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Test  >  Compiler Design  >  Test: Code Generation - Computer Science Engineering (CSE) MCQ

Code Generation - Free MCQ Practice Test with solutions, GATE CSE (CSE)


MCQ Practice Test & Solutions: Test: Code Generation (15 Questions)

You can prepare effectively for Computer Science Engineering (CSE) Compiler Design with this dedicated MCQ Practice Test (available with solutions) on the important topic of "Test: Code Generation". These 15 questions have been designed by the experts with the latest curriculum of Computer Science Engineering (CSE) 2026, to help you master the concept.

Test Highlights:

  • - Format: Multiple Choice Questions (MCQ)
  • - Duration: 10 minutes
  • - Number of Questions: 15

Sign up on EduRev for free to attempt this test and track your preparation progress.

Test: Code Generation - Question 1

 Grammar that produce more than one Parse tree for same sentence is

Detailed Solution: Question 1

An ambiguous grammar is one for which there is more than one parse tree for a single sentence.

Test: Code Generation - Question 2

 Automaton accepting the regular expression of any number of a ‘ s is

Detailed Solution: Question 2

It gives any number of a’s.

Test: Code Generation - Question 3

Grammars that can be translated to DFAs:

Detailed Solution: Question 3

 Right linear grammar can be translated to the DFAs.

Test: Code Generation - Question 4

The language accepted by a Push down Automata

Detailed Solution: Question 4

 A known fact that type 2 grammar is accepted by PDA.

Test: Code Generation - Question 5

Given the following statements : (i) Recursive enumerable sets are closed under complementation. (ii) Recursive sets are closed under complements. Which is/are the correct statements ?

Detailed Solution: Question 5

Recursive languages are closed under the following operations.
The Kleene star L * of L
the concatenation L * o P of L and P
the union L U P
the intersection L ∩ P.

Test: Code Generation - Question 6

Assume statements S1 and S2 defined as : S1 : L2-L1 is recursive enumerable where L1 and L2 are recursive and recursive enumerable respectively. S2 : The set of all Turing machines is countable. Which of the following is true ?

Detailed Solution: Question 6

The assumptions of statement S1 and S2 are correct.

Test: Code Generation - Question 7

A context free language is called ambiguous if

Detailed Solution: Question 7

When two or more Left and right most derivative occur the grammar turn ambiguous.

Test: Code Generation - Question 8

Which of the following statement is false?

Detailed Solution: Question 8

All the statements follow the rules.

Test: Code Generation - Question 9

The context free grammar S → A111|S1, A → A0 | 00 is equivalent to

Detailed Solution: Question 9

S-> A111
S->00111 (A->00)

Test: Code Generation - Question 10

The context free grammar S → SS | 0S1 | 1S0 | ɛ generates

Detailed Solution: Question 10

S->SS
S->0S1S
S->0S11S0
S->0110.

Test: Code Generation - Question 11

Which of the following statement is false?

Detailed Solution: Question 11

 All of them are true regarding a derivation tree.

Test: Code Generation - Question 12

Push down automata accepts which language

Detailed Solution: Question 12

PDA accepts CFG.

Test: Code Generation - Question 13

 A regular Grammar is a

Detailed Solution: Question 13

Regular grammar is CFG. It restricts its rules to a single non terminal on left hand side.

Test: Code Generation - Question 14

A CFG is closed under

Detailed Solution: Question 14

CFG is closed under the above mentioned 3 operations.

Test: Code Generation - Question 15

Which of these does not belong to CFG?

Detailed Solution: Question 15

 CFG consist of terminal non terminal start symbol set of production rules but does not have an end symbol.

26 videos|92 docs|30 tests
Information about Test: Code Generation Page
In this test you can find the Exam questions for Test: Code Generation solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Code Generation, EduRev gives you an ample number of Online tests for practice
26 videos|92 docs|30 tests
Download as PDF