Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Tests  >  Test: Code Generation & Optimization- 1 - Computer Science Engineering (CSE) MCQ

Test: Code Generation & Optimization- 1 - Computer Science Engineering (CSE) MCQ


Test Description

10 Questions MCQ Test - Test: Code Generation & Optimization- 1

Test: Code Generation & Optimization- 1 for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Test: Code Generation & Optimization- 1 questions and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus.The Test: Code Generation & Optimization- 1 MCQs are made for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Code Generation & Optimization- 1 below.
Solutions of Test: Code Generation & Optimization- 1 questions in English are available as part of our course for Computer Science Engineering (CSE) & Test: Code Generation & Optimization- 1 solutions in Hindi for Computer Science Engineering (CSE) course. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free. Attempt Test: Code Generation & Optimization- 1 | 10 questions in 30 minutes | Mock test for Computer Science Engineering (CSE) preparation | Free important questions MCQ to study for Computer Science Engineering (CSE) Exam | Download free PDF with solutions
Test: Code Generation & Optimization- 1 - Question 1

A non relocatable program is one which

Detailed Solution for Test: Code Generation & Optimization- 1 - Question 1

The phases of compiler
1. Lexical
2. Syntax
3. Semantic
4. Intermediate code generation, are all machine dependent phases and are not relocatable.
The together make pass-1 of the compiler. This program hence can not be made to execute in any area of storage other than the one designated for it at the time of its coding or translation.

Test: Code Generation & Optimization- 1 - Question 2

A self relocating program is one which

Detailed Solution for Test: Code Generation & Optimization- 1 - Question 2

The self relocating program is one which can itself perform the relocation of its address sensitive portion. Code-optimization and target code generation comes under the pass-2 of the compiler and is machine independent.

1 Crore+ students have signed up on EduRev. Have you? Download the App
Test: Code Generation & Optimization- 1 - Question 3

Generation of intermediate code based on a abstract machine model is useful in compilers because

Detailed Solution for Test: Code Generation & Optimization- 1 - Question 3

By the help of intermediate code generation, the portability of the front end of the compiler enhances.

Test: Code Generation & Optimization- 1 - Question 4

Consider the adjacent binary tree:

$ denotes exponentiation. If the tree is traversed in preorder, which, if any, of the expressions below is formed?

Detailed Solution for Test: Code Generation & Optimization- 1 - Question 4


The preorder expansion can be represented as 

$ + x*yz* + xyz

Test: Code Generation & Optimization- 1 - Question 5

Which of the following cannot be used as an intermediate code form?

Detailed Solution for Test: Code Generation & Optimization- 1 - Question 5

Quadruples is not the intermediate code form.

Test: Code Generation & Optimization- 1 - Question 6

A basic block can be analyzed by

Detailed Solution for Test: Code Generation & Optimization- 1 - Question 6

Properties of a basic block are as follows:

  • The flow of control can only enter the basic block through the first instruction in the block.
  • No numps in the middle of the block.
  • Control leaves the block without halting/branching.

The basic blocks become the nodes of a flow graph, whose edges indicate which blocks can follows which other blocks.

Test: Code Generation & Optimization- 1 - Question 7

The graph that shows the basic blocks and their successor relationship is called

Detailed Solution for Test: Code Generation & Optimization- 1 - Question 7

The graph that shows the basic blocks and their successor relationship is called control graph.

Test: Code Generation & Optimization- 1 - Question 8

Consider the following C code segment: 

Which one of the following is false?

Detailed Solution for Test: Code Generation & Optimization- 1 - Question 8

(a) i%2 is inner loop invariant, it can be moved before inner loop.
(b) 4*j is common sub-expression-appeared in two statements.
(c) 4*j can be reduced to j<<2 by strength reduction.
(d) There is no dead code in given code segment. So there is no scope of dead code elimination in this code.
Hence only option (d) is FALSE.

Test: Code Generation & Optimization- 1 - Question 9

Some code optimizations are carried out on the intermediate code because

Detailed Solution for Test: Code Generation & Optimization- 1 - Question 9

Some code optimizations are carried out on the intermediate code because program analysis is more accurate on intermediate code than on machine code.

Test: Code Generation & Optimization- 1 - Question 10

Which languages necessarily need heap allocation in the runtime environment?

Detailed Solution for Test: Code Generation & Optimization- 1 - Question 10

Runtime environment means we deal with dynamic memory allocation and Heap is a dynamic data structure.
So it is clear that those languages that allow dynamic data structure necessarily need heap allocation in the runtime environment.

Information about Test: Code Generation & Optimization- 1 Page
In this test you can find the Exam questions for Test: Code Generation & Optimization- 1 solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Code Generation & Optimization- 1, EduRev gives you an ample number of Online tests for practice

Top Courses for Computer Science Engineering (CSE)

Download as PDF

Top Courses for Computer Science Engineering (CSE)