0

Compiler Design - 1

Description: Compiler Design - 1
Number of Questions: 15
Created by:
Tags: Compiler Design - 1 Compiler Design
Attempted 0/15 Correct 0 Score 0

Which kind of errors are corrected by Minimum Hamming Distance Method?

  1. Semantic errors

  2. Syntactic errors

  3. Algorithmic errors

  4. Transcription errors


Correct Option: B

Which of the following is associated with the term “Machine independent optimisation” in analysing the compilation of PL/I programme?

  1. Recognition of basic syntactic construction through reductions

  2. Creation of more optimal matrix

  3. Recognition of basic elements and creation of uniform symbols

  4. None of these


Correct Option: B

If the control signals (m, n, p, q, r, s, t) for same micro-instructions and their corresponding 17 CC's are: {m, q, s, t, m, n, q, p, t, q, r, t}, which of the following are to be removed to determine the minimum MCC cover?

  1. m, q, s, t

  2. n, p, t

  3. m, n, q

  4. m, n, o, p


Correct Option: C

A programmer, by mistake, writes an instruction 'divide' instead of 'multiply'. Which of the following will detect such kind of error?

  1. Interpreter

  2. Compiler

  3. Compiler or interpreter test

  4. None of these


Correct Option: B

Which of the following optimisations avoids a test at every iteration?

  1. Loop ramming

  2. Loop unrolling

  3. Both (1) and (2)

  4. Either (1) or (2)


Correct Option: B

Which of the following is not true for a non-relocatable programme?

  1. It consists of a programme and relevant information for its relocation.

  2. It cannot be made to execute in any area of storage other than the one designated for it at the time of its coding or translation.

  3. It can itself perform the relocation of its address sensitive portions.

  4. Both (1) and (3)


Correct Option: D

The advantage(s) of incorporating the macro-processor into pass I is/are that

  1. many functions do not have to be implemented twice

  2. functions are combined and it is not necessary to create intermediate files as output from the macro-processor and input to the assembler

  3. both (1) and (2)

  4. none of these


Correct Option: C

The process, when we divide a project into segments and smaller units in order to simplify the analysis, design and programming efforts, is known as

  1. left right approach

  2. top down approach

  3. bottom up approach

  4. modular approach


Correct Option: D

A language, with string manipulation facilities, uses the following operations: head (s): First character of a string tail (s): All, but the first character of a string concat (s1, s2) : s1 s2 For the string acbc, what will be the output of concat (head (s), head (tail (tail(s))))?

  1. mo

  2. no

  3. mn

  4. mnoo


Correct Option: C

Which of the following is true about an ideal compiler?

  1. It should be written in a high level language.

  2. It should produce the code that is smaller in size and executes faster.

  3. It should be smaller in size and it takes lesser time for compiling.

  4. None of these


Correct Option: C

Which of the following parts of the system software must reside in the main memory under all circumstances?

  1. Text editor

  2. Assembler

  3. Loader

  4. Linker


Correct Option: C

Which of the following system-programmes forgoes the production of object code to generate absolute machine code and loads it into the physical main storage location from which it will be executed immediately upon completion of the assembly?

  1. Two pass assembler

  2. Micro processor

  3. Load-and-go assembler

  4. None of these


Correct Option: C

Which of the following means 'reduction in strength'?

  1. Removing loop invariant computation

  2. Replacing run-time computation by compile time computation

  3. Removing common sub-expressions

  4. Replacing a costly operation by a relatively cheaper one


Correct Option: B

Which of the following is true in case of 'C language'?

  1. At the most, one activation record exists either the current activation record or the activation record for the main.

  2. The number of activation records, between the current activation record and the activation record for the main, depends on the actual function called sequence.

  3. Recursion requires the activation record for the recursive function to be saved on a different stack before the recursive function can be called.

  4. The visibility of global variables depends on the actual function, called sequence.


Correct Option: D

If two finite state machines M and N are isomorphic, which of the following is true?

  1. M can be transformed to N, merely re-labelling its states.

  2. M can be transformed to N, merely re-labelling its edges.

  3. Either (1) or (2)

  4. None of these


Correct Option: A
Explanation:

 If two finite state machines M and N are isomorphic, M can be transformed to N, merely re-labelling its states.

- Hide questions