Home
Courses
About
School
Notes
Questions
MCQ
Contact
Vocational Courses
Compilers
Compilers
Lexical Analyser
Question 1
Marks :
+2
|
-2
Pass Ratio :
100%
In a compiler the module that checks every character of the source text is called __________
The code generator
The code optimizer
The lexical analyzer
The syntax analyzer
Explanation:
Lexical analysis is the process of converting a sequence of characters into a sequence of tokens.
Question 2
Marks :
+2
|
-2
Pass Ratio :
100%
When expression sum=3+2 is tokenized then what is the token category of 3?
Identifier
Assignment operator
Integer Literal
Addition Operator
Explanation:
Question 3
Marks :
+2
|
-2
Pass Ratio :
100%
Which one is a lexer Generator?
ANTLR
DRASTAR
FLEX
All of the mentioned
Explanation:
ANTLR – Can generate lexical analyzers and parsers.
Question 4
Marks :
+2
|
-2
Pass Ratio :
100%
An individual token is called ________
Lexeme
Lex
Lexeme & Lex
None of the mentioned
Explanation:
Individual Token is also Called Lexeme.
Question 5
Marks :
+2
|
-2
Pass Ratio :
100%
Input to Lexical Analyser is _________
Source Code
Object Code
Lexeme
None of the mentioned
Explanation:
Lexical analyser’s Input is Source Code.
Question 6
Marks :
+2
|
-2
Pass Ratio :
100%
Lexical Analyser’s Output is given to Syntax Analysis.
True
False
Explanation:
Lexical Analyzer’s Output is given to Syntax Analysis.
Question 7
Marks :
+2
|
-2
Pass Ratio :
100%
It has encoded within it information on the possible sequences of characters that can be contained within any of the tokens it handles. The mentioned function is performed by?
Scanner
Parser
Syntactic Analyser
All of the mentioned
Explanation:
The first stage, the scanner, is FSM. It has encoded information on the possible sequences of characters that can be contained within any of the tokens it handles.
Question 8
Marks :
+2
|
-2
Pass Ratio :
100%
Which phase of the compiler is Lexical Analyser?
First
Second
Third
None of the mentioned
Explanation:
Lexical Analyzer is First Phase of Compiler.
Question 9
Marks :
+2
|
-2
Pass Ratio :
100%
A ________ is a string of characters which form a syntactic unit.
Lexeme
Lex
Lexeme & Lex
None of the mentioned
Explanation:
A lexeme is a string of characters that form a syntactic unit.
Question 10
Marks :
+2
|
-2
Pass Ratio :
100%
What is the output of a lexical analyzer?
Machine Code
Intermediate Code
Stream of Token
Parse Tree
Explanation:
The output given is in the form of tokens.
1
2
3
4
5
6
7
8
9
10
Time Left:
Submit
Score
:
Rank
:
Accuracy
:
%
Time
:
Total Question
:
Attempted
:
Correct
:
Wrong
:
User Name
Email Id
Mobile No
Submit