Compiler Design MCQ Questions And Answers - Finite Automata
This section focuses on "Finite Automata" in Compiler Design. These Multiple Choice Questions (MCQ) should be practiced to improve the Compiler Design skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. In finite automata, Q stands for?
A. Finite set of input symbols
B. Transition function
C. Finite set of states
D. One Start state
View Answer
Ans : C
Explanation: The mathematical model of finite automata : Finite set of states (Q).
2. Final state is represented by?
A. Square
B. Circle
C. Double Circlue
D. Rhombus
View Answer
Ans : C
Explanation: If the input string is successfully parsed, the automata is expected to be in this state. Final state is represented by double circles.
3. _________ of FA are represented by circles
A. States
B. Start state
C. Intermediate states
D. Transition
View Answer
Ans : A
Explanation: States : States of FA are represented by circles. State names are written inside circles.
4. How many arrow does intermediate states have?
A. 1
B. 2
C. 3
D. 4
View Answer
Ans : B
Explanation: Intermediate states : All intermediate states have at least two arrows; one pointing to and another pointing out from them.
5. In Final state, The number of odd arrows are one greater than even, i.e. odd = even+1?
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: It may have any odd number of arrows pointing to it and even number of arrows pointing out from it. The number of odd arrows are one greater than even, i.e. odd = even+1.
6. There are ________ tuples in finite state machine
A. 3
B. 4
C. 5
D. 6
View Answer
Ans : C
Explanation: States, input symbols,initial state,accepting state and transition function
7. Number of states require to accept string ends with 10.
A. 0
B. 1
C. 2
D. 3
View Answer
Ans : D
Explanation: This is minimal finite automata
8. Languages of a automata is
A. If it halts
B. If it is accepted by automata
C. If automata touch final state in its life time
D. All language are language of automata
View Answer
Ans : B
Explanation: If a string accepted by automata it is called language of automata.
9. Language of finite automata is
A. Type 0
B. Type 1
C. Type 2
D. Type 3
View Answer
Ans : D
Explanation: According to Chomsky classification
10. The basic limitation of finite automata is that
A. it can’t remember arbitrary large amount of information
B. it sometimes recognize grammar that are not regular
C. it sometimes fails to recognize regular grammar
D. None of the above
View Answer
Ans : A
Explanation: Because there is no memory associated with automata.
Discussion