Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Test  >  GATE Computer Science Engineering(CSE) 2027 Mock Test Series  >  Test: Lexical Analysis- 1 - Computer Science Engineering (CSE) MCQ

GATE Computer Science Engineering(CSE) 2027 Test: Lexical Analysis- 1 Free


MCQ Practice Test & Solutions: Test: Lexical Analysis- 1 (15 Questions)

You can prepare effectively for Computer Science Engineering (CSE) GATE Computer Science Engineering(CSE) 2027 Mock Test Series with this dedicated MCQ Practice Test (available with solutions) on the important topic of "Test: Lexical Analysis- 1". These 15 questions have been designed by the experts with the latest curriculum of Computer Science Engineering (CSE) 2026, to help you master the concept.

Test Highlights:

  • - Format: Multiple Choice Questions (MCQ)
  • - Duration: 45 minutes
  • - Number of Questions: 15

Sign up on EduRev for free to attempt this test and track your preparation progress.

Test: Lexical Analysis- 1 - Question 1

In analyzing the compilation of PL/I program, the term “Machine independent optimization” is associated with:

Detailed Solution: Question 1

The code optimization phase [i.e. machine independent optimization] attempts to improve the intermediate code, so that faster-running machine code will result.
Hence, it is associated with the creation of more optimal matrix.

Test: Lexical Analysis- 1 - Question 2

In a two pass assembler pseudo code EQU is to be evaluated during

Detailed Solution: Question 2

In 2-pass assembler during pass-1 pseudo code EQU is to be evaluated.

Test: Lexical Analysis- 1 - Question 3

Pick the functions which are completely performed in pass 1

Detailed Solution: Question 3

Operation performed during pass-1 in 2-pass compiler:
1. Processing the DB pseudo-op.
2. Updating the location counter.
3. Processing of EQU pseudo-op.
4. Processing of DS pseudo-op.

Test: Lexical Analysis- 1 - Question 4

Consider the following issues:
1. Simplify the phases.
2. Compiler efficiency is improved.
3. Compiler works faster.
4. Compiler portability is enhanced.

Which is/are true in context of lexical analysis?

Detailed Solution: Question 4

Lexical analysis consists of the phases that
(i) Simplify the subsequent phases by the help of tokens instead of arbitrary elements.
(ii) Since interrelated elements are converted to stream of tokens hence compiler efficiency is improved as no arbitrary storage or value is to be checked independently.
(iii) Computer portability is enhanced.

Test: Lexical Analysis- 1 - Question 5

Consider line number 3 of the following C-program.
int main ()  { /* Line 1 */ 
int i, n; /* Line 2 */
fro (i = 0, i < n, /+ + ); /* Line 3 */
}

Identify the compiler’s response about this line while creating the object - module

Detailed Solution: Question 5

Error is underlined function fro()
Which is a syntactical error rather than lexical.

Test: Lexical Analysis- 1 - Question 6

Hash tables can contribute to an efficient average case solution for

Detailed Solution: Question 6

Hash table can contribute to an efficient average case solution for symbol table look up problem

Test: Lexical Analysis- 1 - Question 7

In analyzing the compilation of PL/I program the description “resolving symbolic address (lables) and generating machine language” is associated with _______.

Detailed Solution: Question 7

The final phase of the compiler is the generation of target code, consisting of relocatable machine code or assembly code. Intermediate instruction are each translated into a sequence of machine instructions that perform the same task. A crucial aspect is the assignment of variables to registers.

Test: Lexical Analysis- 1 - Question 8

In analyzing the compilation of PL/I program the description “creation of more optimal matrix” is associated with

Detailed Solution: Question 8

In analysing the compilation of PL/I program the description "creation of more optimal matrix” is associated with machine independent optimization.

Test: Lexical Analysis- 1 - Question 9

In analyzing the compilation of PL/I program, the term “lexical analysis” is associated with

Detailed Solution: Question 9

The main task of lexical analyser is to read the input characters and producers as output  sequence of tokens that the parser uses for syntax analysis.

Test: Lexical Analysis- 1 - Question 10

The translator is best described as

Detailed Solution: Question 10

Translator is a system software. Generally, it comes with the operating system.

Test: Lexical Analysis- 1 - Question 11

Resolution is externally defined symbols is performed by

Detailed Solution: Question 11

Resolution is generally done during linking. Hence, linker does this

Test: Lexical Analysis- 1 - Question 12

A simple two-pass assembler does which of the following in the first pass?
1. It allocates space for the literals.
2. It computes the total length of the program.
3. It builds the symbol table for the symbols and their values.
4. It generates code for all the load and stores register instruction.

Detailed Solution: Question 12

Simple two-pass assembler:
1. Allocates space for the literals.
2. Computers the total length of program (syntax analysis).
3. Builds the symbol table for the symbols and their values.

Test: Lexical Analysis- 1 - Question 13

A compiler is

Detailed Solution: Question 13

A compiler is a software program that accepts a program written in a high level language and generate object code.

Test: Lexical Analysis- 1 - Question 14

A loader is

Detailed Solution: Question 14

A loader is a program that place programs into memory and prepare them for execution.

Test: Lexical Analysis- 1 - Question 15

Which of the following are language processors?

Detailed Solution: Question 15

There are three types of language processors:

  • Assembler
  • Interpreter
  • Compiler

56 docs|215 tests
Information about Test: Lexical Analysis- 1 Page
In this test you can find the Exam questions for Test: Lexical Analysis- 1 solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Lexical Analysis- 1, EduRev gives you an ample number of Online tests for practice
Download as PDF