Site navigation

Theory of Computation and Compilers MCQs with Answers

Try the topic preview and open any solution for a worked explanation.

Question 1

Which of the following languages are not regular?

A. L={ (01)n0k | n > k, k>=0 }

B. L={ cnbkan+k | n >= 0, k>=0 }

C. L={ 0n1k | n≠k }

Select one answer

Question 2

Let

L1 = { 0n1n0m | n>=1, m>=1 }

L2 = { 0n1m0m | n>=1, m>=1 }

L3 = { 0n1n0n | n>=1 }

Which of the following are correct statements?

A. L3=L1 ∩ L2

B. L1 and L2 are context free languages but L3 is not a context free language

C. L1 and L2 are not context free languages but L3 is a context free language

D. L1 is a subset of L3

Select one answer

Question 3

Given below are two statements
Statement I: The family of context free languages is closed under homomorphism
Statement II: The family of context free languages is closed under reversal

Select one answer

Question 4

Which of the following concepts can be used to identify loops?
A. Depth first ordering
B. Dominators
C. Reducible graphs

Select one answer

Question 5

Given below are two statements
Statement I: LL(1) and LR are examples of Bottom‐up parsers.
Statement II: Recursive descent parser and SLR are examples of Top‐down parsers

Select one answer

Question 6

In two pass assembler the symbol table is used to store :

Select one answer

Question 7

Which of the following is not true ?

Select one answer

Question 8

Which of the statements related to Compilers is wrong ?

Select one answer

Question 9

The logic of pumping lemma is a good example of :
Select one answer

Question 10

Which of the regular expressions corresponds to this grammar ?
S → AB/AS, A → a/aA, B → b
Select one answer

Practise for these exams

  • UGC NET Computer Science and Applications

  • RPSC Assistant Professor (College Education)

  • CUSAT CAT M.Sc. Forensic Science