Test: Lexical Analysis- 1


10 Questions MCQ Test GATE Computer Science Engineering(CSE) 2023 Mock Test Series | Test: Lexical Analysis- 1


Description
Attempt Test: Lexical Analysis- 1 | 10 questions in 30 minutes | Mock test for Computer Science Engineering (CSE) preparation | Free important questions MCQ to study GATE Computer Science Engineering(CSE) 2023 Mock Test Series for Computer Science Engineering (CSE) Exam | Download free PDF with solutions
QUESTION: 1

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

Solution:

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.

QUESTION: 2

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

Solution:

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.

QUESTION: 3

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

Solution:

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

QUESTION: 4

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

Solution:

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.

QUESTION: 5

The translator is best described as

Solution:

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

QUESTION: 6

Resolution is externally defined symbols is performed by

Solution:

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

QUESTION: 7

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.

Solution:

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.

QUESTION: 8

A compiler is

Solution:

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

QUESTION: 9

A loader is

Solution:

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

QUESTION: 10

Which of the following are language processors?

Solution:

There are three types of language processors:

  • Assembler
  • Interpreter
  • Compiler
Use Code STAYHOME200 and get INR 200 additional OFF
Use Coupon Code