Compiler Design - - Unit 4 - Week 2 https://onlinecourses-archive.nptel.ac.in/noc19_...
[email protected] ▼
Courses » Compiler Design Announcements Course Ask a Question Progress FAQ
Unit 4 - Week 2
Register for
Certification exam Assignment 2
The due date for submitting this assignment has passed.
Course As per our records you have not submitted this Due on 2019-02-13, 23:59 IST.
outline
assignment.
How to access 1) Lexical analyser generates the next token 1 point
the portal
(A) When it is asked for
Week 0
(B) By maintaining a repository of tokens
Week 1 (C) By scanning the whole input
(D) None of the other options
Week 2
No, the answer is incorrect.
Lecture 07 :
Score: 0
Lexical
Analysis Accepted Answers:
(A) When it is asked for
Lecture 08 :
Lexical 2) Lexical analysis and parsing are put as two different phases so as to 1 point
Analysis
(Contd.)
(A) Make design simple
Lecture 09 :
Lexical
(B) Improve efficiency
Analysis (C) Enhance portability
(Contd.)
(D) All of the other options
Lecture 10 :
Lexical No, the answer is incorrect.
Analysis Score: 0
(Contd.)
Accepted Answers:
Lecture 11 : (D) All of the other options
Lexical
Analysis 3) A lexeme is 1 point
(Contd.)
Lecture (A) Any sequence of characters
Materials
(B) Sequence of characters defining a token
Quiz : (C) Same as a token
Assignment 2
(D) Not related to any token
Feedback for
Week 2 No, the NPTEL
answer- is incorrect.
© 2014 Privacy & Terms - Honor Code - FAQs -
Score: 0
A project
Week of3 In association with
Accepted Answers:
Week 4 (B) Sequence of characters defining a token
4) Character sequence “2r” is not a Funded
lexical error
by if the language allows 1 point
1 of 4 Friday 21 June 2019 10:59 AM
Compiler Design - - Unit 4 - Week 2 https://onlinecourses-archive.nptel.ac.in/noc19_...
Powered
(A) Symbol by to start with integers
names
Week 5
(B) Juxtaposition is taken as a valid operator
Week 6
(C) Length of symbol names is not fixed
Week 7 (D) Symbol names to start with integers or juxtaposition is taken as a valid operator
Week 8 No, the answer is incorrect.
Score: 0
Week 9 Accepted Answers:
(D) Symbol names to start with integers or juxtaposition is taken as a valid operator
Week 10
5) A certain compiler corrects errors like “fi” to “if” automatically. This is an example of 1 point
Week 11 recovery in
Week 12 (A) Panic mode
(B) Delete character
DOWNLOAD
VIDEOS (C) Replace character
(D) Transpose characters
Solution
No, the answer is incorrect.
Interaction Score: 0
Session
Accepted Answers:
(D) Transpose characters
6) For the Fortran language statement “DO 5 I = 1.25” returns token IDENTIFIER for DO 5 I 1 point
after looking upto
(A) I
(B) =
(C) .
(D) 5
No, the answer is incorrect.
Score: 0
Accepted Answers:
(C) .
7) A regular expression represents 1 point
(A) Constituent strings of a language
(B) Part of a language
(C) Cannot represent any language
(D) None of the other options
No, the answer is incorrect.
Score: 0
Accepted Answers:
(A) Constituent strings of a language
8) The regular expression (0|1)*(0|1) represents a language with 1 point
(A) Nonempty binary strings
(B) Empty and nonempty binary strings
(C) Odd nonempty strings
(D) Even nonempty strings
No, the answer is incorrect.
2 of 4 Friday 21 June 2019 10:59 AM
Compiler Design - - Unit 4 - Week 2 https://onlinecourses-archive.nptel.ac.in/noc19_...
Score: 0
Accepted Answers:
(A) Nonempty binary strings
9) The regular expression (0|1)*00 will accept all strings 1 point
(A) Divisible by 2
(B) Divisible by 4
(C) Divisible by 2 with minimum length 2
(D) Divisible by 4 with minimum length 2
No, the answer is incorrect.
Score: 0
Accepted Answers:
(D) Divisible by 4 with minimum length 2
10)A regular expression for accepting strings with exactly one 1 more than 0’s is 1 point
(A) 0*1
(B) (0|1)*1(0|1)*
(C) (0|1)*1(0|1)*|1(0|1)*
(D) Not possible
No, the answer is incorrect.
Score: 0
Accepted Answers:
(D) Not possible
11)Finite automata is an implementation of 1 point
(A) Regular expression
(B) Any grammar
(C) Part of a regular expression
(D) None of the other options
No, the answer is incorrect.
Score: 0
Accepted Answers:
(A) Regular expression
12)A DFA cannot have 1 point
(A) Epsilon transitions
(B) An isolated state
(C) More than one transition from a state on same inout
(D) All of the other options
No, the answer is incorrect.
Score: 0
Accepted Answers:
(D) All of the other options
13)Number of possible epsilon transitions from a state in an NFA is 1 point
(A) One
(B) At most one
(C) Many
3 of 4 Friday 21 June 2019 10:59 AM
Compiler Design - - Unit 4 - Week 2 https://onlinecourses-archive.nptel.ac.in/noc19_...
(D) Zero
No, the answer is incorrect.
Score: 0
Accepted Answers:
(C) Many
14)Between NFA and DFA which one is easier to implement 1 point
(A) NFA
(B) DFA
(C) Equal effort needed
(D) Cannot be said definitely
No, the answer is incorrect.
Score: 0
Accepted Answers:
(B) DFA
15)Between NFA and DFA which one is more powerful 1 point
(A) NFA
(B) DFA
(C) Equally powerful
(D) Cannot be said definitely
No, the answer is incorrect.
Score: 0
Accepted Answers:
(C) Equally powerful
Previous Page End
4 of 4 Friday 21 June 2019 10:59 AM