Test: Code Optimization


10 Questions MCQ Test Compiler Design | Test: Code Optimization


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

Compiler can diagnose

Solution:

Only syntactical errors can be detected by the compiler.

QUESTION: 2

A simple two-pass assembler does which of the following in the first pass?

Solution:

A two-pass assembler. Each pass scans the program, the first pass generates the symbol table and the second pass generates the machine code…

QUESTION: 3

A system program that set-up an executable program in main memory ready for execution is

Solution:

A loader is the part of an operating system that is responsible for loading programs and libraries. It is important that with the starting of a program, as it places programs into memory and executes it.

QUESTION: 4

A compiler is a program that

Solution:

A compiler is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code).

QUESTION: 5

A programmer by mistake writes multiplication instead of division, such error can be detected by a/an

Solution:

No Logical errors can’t be detected.

QUESTION: 6

 The computer language generally translated to pseudo-code is

Solution:

 An assembly language (or assembler language) is a low-level programming language for a computer, or other programmable device, in which there is a very strong (generally one-to-one) correspondence between the language and the architecture’s machine code instructions.

QUESTION: 7

A system program that combines separately compiled modules of a program into a form suitable for execution is

Solution:

A loader which combines 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: 8

 In which way a macro processor for assembly language can be implemented?

Solution:

A general-purpose macro processor or general purpose preprocessor is a macro …designed for string manipulation, macro definition.

QUESTION: 9

Resolution of externally defined symbols is performed by

Solution:

 A linker or link editor is a computer program that takes one or more object files generated by a compiler and combines them into a single executable file, library file, or another object file.

QUESTION: 10

A shift reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of grammar S—-> xxW ( PRINT “1”) S—-> y { print ” 2 ” } S—-> Sz { print ” 3 ” )

What is the translation of xxxxyzz using the syntax directed translation scheme described by the above rules ?

Solution:

Correct Answer :- a

Explanation : The string w = xxxxyzz from the given grammar and attach the Symantec actions as follows

S→y           2

W→Sz        23 231

S→xxW      23 13

W →Sz       23131

S → x x W

 

Related tests