Explore topic-wise MCQs in Compilers.

This section includes 8 Mcqs, each offering curated multiple-choice questions to sharpen your Compilers knowledge and support exam preparation. Choose a topic below to get started.

1.

If ∑ = {a, b, c, d, e, f} then number of strings in ∑ of length 4 such that no symbol is used more than once in a string is

A. 35
B. 360
C. 49
D. 720
Answer» C. 49
2.

Which of the following are not regular?

A. String of )’s which has length that is a perfect square
B. Palindromes Consisting of 0’s 1’s
C. String of 0’s whose length is a prime number
D. All of the mentioned
Answer» E.
3.

Let L denotes the language generated by the grammar S – OSO/00. Which of the following is true?

A. L = O
B. L is regular but not O
C. L is context free but not regular
D. L is not context free
Answer» C. L is context free but not regular
4.

Given a NFA with N states, the maximum number of states in an equivalent minimized DFA is at least.

A. N2
B. 2N
C. 2N
D. N!
Answer» C. 2N
5.

Which of the following pairs of regular expressions are equivalent?

A. 1(01)* and (10)*1
B. x (xx)* and (xx)*x
C. x+ and x+ x(*+)
D. All of the mentioned
Answer» E.
6.

Consider the following two statements. Which of the following is true?

A. Only S1 is correct
B. Only S2 is correct
C. Both S1 and S2 are correct
D. None of S1 and S2 is correctView Answer
Answer» D. None of S1 and S2 is correctView Answer
7.

An FSM with __________

A. M can be transformed to Numeral relabeling its states
B. M can be transformed to N, merely relabeling its edges
C. Both of the mentioned
D. None of the mentioned
Answer» D. None of the mentioned
8.

Number of states of FSM required to simulate behaviour of a computer with a memory capable of storing “m” words, each of length ‘n’.

A. m x 2n
B. 2mn
C. 2(m+n)
D. all of the mentioned
Answer» C. 2(m+n)