SP CHAPTER 1 MCQ
Unit-1 Language
Processors
A program that
performs lexical analysis is termed as_________
a.Scanner b. lexer c.
tokenizer d. All of the mentioned
Assembly language program is called as _________
Object program b.Source
program c.Oriented program d.All of these
CFG can be recognized by _________
a.Finite State Automata b.Linear Bounded Automata
c.Pushdown
Automata d.Both b & C
Compiler bridges the semantic gap between which domains?
a.Application
and Execution b.Application and PL
c.PL and Execution d.None
of these
Execution gap is the gap between____________.
a.AD & ED b.PLD & ED c.AD
& PLD d.None of the above
Software implementation using PL introduces new domain called ________
a.Application
Domain b.PL Domain
c.Execution
Domain d.Program
Generator Domain
The language processor converts C++ program into _____ program.
a.Assembly
language b.Machine language
c.C language d.C++
language
The output of the lexical and syntax analyzer can stated as
a.parse stream,
parse tree b. token tree, parse tree
c. token stream, parse tree d.
All of the mentioned
The phase structured grammar is _________.
a.Regular
Grammar b.CFG
c.Context
Sensitive Grammar d.None
of the above
Which phase of compiler includes Lexical Analysis?
a.1 b.2 c.3 d.Its
primary function, not in any phase
______________are
generated as output of scanning.
a.Parse tree b.Tokens c.Sequence of actions d.IR
_____is the first step in the
evolution of programming languages:
a. machine language b. assembly
language
c. code language d. none
of these
________generation computers use assembly language:
a. First
generation b. Third
generation
c. second
generation d. fourth generation
Preparing the pseudocode requires _______time than drawing flowchart:
a. Less b. More c. Optimum d. None
of these
The process of forming tokens from an input stream of characters is called_____
a) Liberalisation b) Characterisation
c) Tokenization d) None of the mentioned
When
expression sum=3+2 is tokenized then what is the token category of 3
a) Identifier b) Assignment operator
c) Integer Literal d) Addition Operator
a) Identifier b) Assignment operator
c) Integer Literal d) Addition Operator
Which
grammar defines Lexical Syntax
a) Regular Grammar b) Syntactic Grammar
c) Context free Grammar d) Lexical Grammar
a) Regular Grammar b) Syntactic Grammar
c) Context free Grammar d) Lexical Grammar
Two
Important lexical categories are
a) White Space b) Comments
c) None of the mentioned d) White Space & Comments
a) White Space b) Comments
c) None of the mentioned d) White Space & Comments
It
has encoded within it information on the possible sequences of characters that
can be contained within any of the tokens it handles .Above motioned function
is performed by?
a) Scanner b) Parser
c) Syntactic Analyser d) All of the mentioned
a) Scanner b) Parser
c) Syntactic Analyser d) All of the mentioned
What
goes over the characters of the lexeme to produce a value?
a) Scanner b) Parser
c) Evaluator d) Lexical generator
a) Scanner b) Parser
c) Evaluator d) Lexical generator
Lexers
are often generated by a lexer generator, same as parser generators,
a) True b) False
a) True b) False
Which
one is a lexer Generator
a) ANTLR b) DRASTAR
c) FLEX d) All of the mentioned
a) ANTLR b) DRASTAR
c) FLEX d) All of the mentioned
Which
of the lexical analyser can handle Unicode
a) Java CC b) JFLex
c) Quex d) All of the mentioned
a) Java CC b) JFLex
c) Quex d) All of the mentioned
A
context free language is called ambiguous if
a) It has 2 or more left derivations for some terminal string ѡ є L (G)
b) It has 2 or more right derivations for some terminal string ѡ є L (G)
c) Both of th ementioned
d) None of the mentioned
a) It has 2 or more left derivations for some terminal string ѡ є L (G)
b) It has 2 or more right derivations for some terminal string ѡ є L (G)
c) Both of th ementioned
d) None of the mentioned
YACC
builds up
a) SLR parsing table b) Canonical LR parsing table
c) LALR parsing table d) None of the mentioned
a) SLR parsing table b) Canonical LR parsing table
c) LALR parsing table d) None of the mentioned
Output
file of Lex is _____ the input file is Myfile.
a) Myfile.e b) Myfile.yy.c
c) Myfile.lex d) Myfile.obj
a) Myfile.e b) Myfile.yy.c
c) Myfile.lex d) Myfile.obj
Comments
Post a Comment