## Compiler Design Set 3

Free Online Best Compiler Design MCQ Questions for improve your basic knowledge of Compiler Design. This Compiler Design set 3test that contains 25 Multiple Choice Questions with 4 options. You have to select the right answer to a question.

Start

Congratulations - you have completed *Compiler Design Set 3*.

You scored %%SCORE%% out of %%TOTAL%%.

Your performance has been rated as %%RATING%%

Your answers are highlighted below.

Question 1 |

What is the transitional function of a DFA?

A | Q X ??Q |

B | Q X ??2Q |

C | Q X ??2n |

D | Q X ??Qn |

Question 2 |

A finite automata recognizes ____________

A | Any Language |

B | Context Sensitive Language |

C | Context Free Language |

D | Regular Language |

Question 3 |

A = {x: x ? x} represents?

A | {0] |

B | {1} |

C | {} |

D | {x} |

Question 4 |

In (a,b) what is b?

A | Domain |

B | Range |

C | Domain & Range |

D | None of Above |

Question 5 |

Consider the production of the grammar S->AA A->aa A->bb Describe the language specified by the production grammar.

A | L = {aaaa,aabb,bbaa,bbbb} |

B | L = {abab,abaa,aaab,baaa} |

C | L = {aaab,baba,bbaa,bbbb} |

D | L = {aaaa,abab,bbaa,aaab} |

Question 6 |

The regular expression denotes a language comprising all possible strings of even length over the alphabet (0, 1).

A | 1 + 0(1+0)* |

B | (0+1) (1+0)* |

C | (1+0) |

D | (00+0111+10)* |

Question 7 |

Syntax Analyser is also known as ___________

A | Hierarchical Analysis |

B | Hierarchical Parsing |

C | None of the mentioned |

D | Hierarchical Analysis & Parsing |

Question 8 |

Which is the application of NFA?

A | A regular language is produced by union of two regular languages |

B | The concatenation of two regular languages is regular |

C | The Kleene closure of a regular language is regular |

D | All of the Above |

Question 9 |

If R is regular language and Q is any language (regular/ non regular), then Pref (Q in R) is _____________

A | Non-regular |

B | Equal |

C | Infinite |

D | Regular |

Question 10 |

The subset construction shows that every NFA accepts a __________

A | String |

B | Function |

C | Regular language |

D | Context-free language |

Question 11 |

The RE in which any number of 0?s is followed by any number of 1?s followed by any number of 2?s is?

A | (0+1+2)* |

B | 0*1*2* |

C | 0* + 1 + 2 |

D | (0+1)*2* |

Question 12 |

If A ? B = B, then?

A | A ? B |

B | A = ø |

C | B ? A |

D | B = ø |

Question 13 |

If a set A has n elements, then the total number of subsets of A is?

A | N |

B | 2n |

C | N2 |

D | 2n |

Question 14 |

A language L from a grammar G = { VN, ?, P, S} is?

A | Set of symbols over VN |

B | Set of symbols over ? |

C | Set of symbols over P |

D | Set of symbols over S |

Question 15 |

An NFA may be converted to a DFA using __________

A | Induction |

B | A construction |

C | Contradiction |

D | Compilation |

Question 16 |

The RE gives none or many instances of an x or y is?

A | (x+y) |

B | (x+y)* |

C | (x* + y) |

D | (xy)* |

Question 17 |

In (a,b) what is a?

A | Domain |

B | Range |

C | Domain & Range |

D | None of Above |

Question 18 |

From where it takes its input from?

A | Lexical analyser |

B | Syntactic Analyser |

C | Semantic Analyser |

D | None of Above |

Question 19 |

The string WWR is not recognized by any FSM because _________

A | An FSM cannot remember arbitrarily large amount of information |

B | An FSM cannot match W with WR |

C | An FSM cannot fix the midpoint |

D | An FSM cannot remember first and last inputs |

Question 20 |

The smallest set A such that A ? {1, 2} = {1, 2, 3, 5, 9} is?

A | {2,3,5} |

B | {1, 2, 5, 9} |

C | {3, 5, 9} |

D | None of Above |

Question 21 |

Empty set is a ___________

A | Invalid set |

B | Infinite set |

C | Finite set |

D | None of Above |

Question 22 |

Maximum number of states of a DFA converted from an NFA with nstates is?

A | N |

B | 2n |

C | N2 |

D | 2n |

Question 23 |

Conversion of a DFA to an NFA __________

A | Is impossible |

B | Requires the subset construction |

C | Is Chancy |

D | Is nondeterministic |

Question 24 |

If A, B and C are any three sets, then A – (B ? C) is equal to _________

A | (A – B) ? (A – C) |

B | (A – B) ? C |

C | (A – B) ? (A – C) |

D | (A – B) ? C |

Question 25 |

What is the transitional function of an NFA?

A | Q X ??Q |

B | Q X ??2Q |

C | Q X ??2n |

D | Q X ??Qn |

Once you are finished, click the button below. Any items you have not completed will be marked incorrect.
Get Results

There are 25 questions to complete.

← |
List |
→ |

Return

Shaded items are complete.

1 | 2 | 3 | 4 | 5 |

6 | 7 | 8 | 9 | 10 |

11 | 12 | 13 | 14 | 15 |

16 | 17 | 18 | 19 | 20 |

21 | 22 | 23 | 24 | 25 |

End |

Return

You have completed

questions

question

Your score is

Correct

Wrong

Partial-Credit

You have not finished your quiz. If you leave this page, your progress will be lost.

Correct Answer

You Selected

Not Attempted

Final Score on Quiz

Attempted Questions Correct

Attempted Questions Wrong

Questions Not Attempted

Total Questions on Quiz

Question Details

Results

Date

Score

Hint

Time allowed

minutes

seconds

Time used

Answer Choice(s) Selected

Question Text

All done

Need more practice!

Keep trying!

Not bad!

Good work!

Perfect!