Test: Lexical Analysis


15 Questions MCQ Test Compiler Design | Test: Lexical Analysis


Description
This mock test of Test: Lexical Analysis for Computer Science Engineering (CSE) helps you for every Computer Science Engineering (CSE) entrance exam. This contains 15 Multiple Choice Questions for Computer Science Engineering (CSE) Test: Lexical Analysis (mcq) to study with solutions a complete question bank. The solved questions answers in this Test: Lexical Analysis quiz give you a good mix of easy questions and tough questions. Computer Science Engineering (CSE) students definitely take this Test: Lexical Analysis exercise for a better result in the exam. You can find other Test: Lexical Analysis extra questions, long questions & short questions for Computer Science Engineering (CSE) on EduRev as well by searching above.
QUESTION: 1

The output of lexical analyzer is

Solution:

Explanation: A lexical analyzer coverts character sequences to set of tokens.

QUESTION: 2

The symbol table implementation is based on the property of locality of reference is

Solution:

Explanation: Hash table is used as a reference for symbol table because it is efficient.

QUESTION: 3

 For operator precedence parsing, which one is true?

Solution:

There are two important properties for these operator precedence parsers is that it does not appear on the right side of any production and no production has two adjacent non-terminals. Implying that no production right side is empty or has two adjacent non-terminals. So accordingly to property option (A) is correct.

QUESTION: 4

Object program is a

Solution:

Explanation: Since the input is the source language and the output that we get after the analysis is the machine language.

QUESTION: 5

 Which concept of FSA is used in the compiler?

Solution:

Explanation: Because the lexer performs its analysis by going from one stage to another.

QUESTION: 6

Which concept of grammar is used in the compiler

Solution:

Explanation: As the lexical analysis of a grammar takes place in phases hence it is synonymous to parser.

QUESTION: 7

Which of the following are Lexemes?

Solution:

Explanation: Different Lexical Classes or Tokens or Lexemes Identifiers, Constants, Keywords, Operators.

QUESTION: 8

What constitutes the stages of the compilation process?

Solution:

Explanation: As defined in the compilation process.

QUESTION: 9

The lexical analyzer takes_________as input and produces a stream of_______as output.

Solution:

Explanation: As per the definition of Lexical Analyser which states that lexical analysis is the process of converting a sequence of characters into tokens.

QUESTION: 10

Which grammar defines Lexical Syntax

Solution:

The specification of a programming language often includes a set of rules, the lexical grammar, which defines the lexical syntax.

QUESTION: 11

 A compiler program written in a high level language is called

Solution:

Explanation: The input that we give in high level language is also known as the source language.

QUESTION: 12

System program such a compiler are designed so that they are

Solution:

Explanation: For the convince of the user compilers are made re-enterable.

QUESTION: 13

Which of the following is not feature of compiler?

Solution:

Explanation: The objective of the compiler is clearly not to increase the execution time of the program.

QUESTION: 14

A system program that brings together separately compiled modules of a program into a form language that is suitable for execution

Solution:

Explanation: A loader which brings together the functions of a relocating loader with the ability to combine a number of program segments that have been independently compiled into an executable program.

QUESTION: 15

A programmer, by mistakes writes a program to multiply two numbers instead of dividing them, how can this error be detected

Solution:

Explanation: This is a logical error can’t be detected by any compiler or interpreter.

Similar Content

Related tests