Hello learners In this article we are going to discuss NPTEL Compiler Design Assignment 2 Answers. All the Answers provided below to help the students as a reference, You must submit your assignment with your own knowledge and use this article as reference only.
About the course:-
Compilers have become part and parcel of today’s computer systems. They are responsible for making the user’s computing requirements, specified as a piece of program, understandable to the underlying machine. There tools work as interface between the entities of two different domains – the human being and the machine. The actual process involved in this transformation is quite complex.
NPTEL Compiler Design Assignment 2 Answers 2024:
1. Consider the following C-program segment.
How many lexical errors are there in the segment?
Answer :- b
2. Which of the following machine model is necessary and sufficient for lexical analysis of modern computer languages?
Answer :- a
3. Consider the following regular expressions:
Choose the correct statement from the options given below. Here, L(r) and L(s) represent the languages generated by r and s respectively.
Answer :- c
4. Which of the following strings is a member of the set represented by the regular expression a(a|b)*a?
Answer :- b
5. Properties followed by the strings conforming to the regular expression (0|1)*0(0|1)(0|1)(0|1) is/are:
Answer :- b
6. Which of the following is the regular expression to represent all binary strings except empty string?
Answer :- a
7. What is the language of the grammar G: A → aB, B → aC, C → aA, C→ a
Answer :- a
8. Which of the following is the regular expression to represent all binary strings having at least 3 characters, and the third character is 0?
Answer :- c
9. How many bit strings of length exactly five are matched by the regular expression 0(0|1)*1?
Answer :- a
10. How many bit strings of length at most four are matched by the regular expression 0(0|1)*1?
Answer :- a
11. What is the language of the following finite state machine?
Answer :- c
12. What is the language of the following finite state machine?
Answer :- d