21st
May
Compiler Design MCQ

Compiler Design MCQ

  • Admin
  • 21st May, 2021
  • 549 Followers

Compiler Design MCQ Quiz

Following are mostly asked Compiler design MCQ test that are designed for professionals like you to crack you interviews. You can take this Compiler design online test before appearing to you real interview. This Compiler design quiz there are around 30+ multiple choice questions on Compiler design with four options.

1) Which of the following is the fastest logic?

  • A. TTL
  • B. CMOS
  • C. ECL
  • D. LSI

2) Compiler translates the source code to

  • A. Both B and C
  • B. Executable code
  • C. Binary code
  • D. Machine code

3) The linker __________

  • A. Is similar to interpreter
  • B. Is required to create a load module
  • C. Uses source code as its input
  • D. None of the mentioned

4) Which of the following groups is/are token together into semantic structures?

  • A. Semantic analyzer
  • B. Is similar to interpreter
  • C. Intermediate code generation
  • D. Lexical analyzer

5) A latch is constructed using which two cross coupled?

  • A. AND gates
  • B. NAND and NOR gates
  • C. AND OR gates
  • D. NAND gates
Download Free : Compiler Design MCQ PDF

6) Pee Hole optimization __________

  • A. Constant folding
  • B. Loop Optimization
  • C. Local Optimization
  • D. Data Flow analysis

7) Shift reduce parsers are __________

  • A. May be top down or bottom up
  • B. Top down Parser
  • C. Bottom Up parser
  • D. None of the mentioned

8) What is the output of lexical analyzer?

  • A. Intermediate code
  • B. A parse tree
  • C. A list of tokens
  • D. Machine code

9) Running time of a program depends on __________

  • A. Addressing mode
  • B. Order of computations
  • C. The usage of machine idioms
  • D. All of the mentioned

10) Inherited attribute is a natural choice in ___________

  • A. Variable declarations record is maintained
  • B. L values and R values
  • C. All of the mentioned
  • D. None of the mentioned

11) YACC builds up __________

  • A. Canonical LR parsing table
  • B. SLR parsing table
  • C. LALR parsing table
  • D. None of the mentioned

12) What is the output of lexical analyzer?

  • A. Set of Token
  • B. A set of regular expression
  • C. Syntax tress
  • D. String of Characters

13) Input to code generator is __________

  • A. Intermediate code
  • B. Source code
  • C. Target code
  • D. All of the mentioned

14) _____________ is a graph representation of a derivation.

  • A. Oct tree
  • B. Binary tree
  • C. The parse tree
  • D. None of the mentioned

15) Which of these is also known as look-head LR parser?

  • A. LLR
  • B. LR
  • C. SLR
  • D. None of the mentioned

16) Which of the following is a phase of a compilation process?

  • A. Lexical Analysis & Code Generation
  • B. Lexical Analysis
  • C. Code Generation
  • D. None of the mentioned

17) A series of statements explaining how the data is to be processed is called _________

  • A. Assembly
  • B. Program
  • C. Assembly
  • D. Machine

18) Which is the most powerful parser?

  • A. Canonical LR
  • B. LALR
  • C. SLR
  • D. Operator Precedence

19) An intermediate code form is ___________

  • A. Three address code
  • B. Postfix Notation
  • C. Syntax Trees
  • D. All of the mentioned

20) The method which merges the bodies of two loops is?

  • A. Loop jamming
  • B. Loop rolling
  • C. Constant folding
  • D. None of the mentioned

21) Which table is a permanent database that has an entry for each terminal symbol?

  • A. Identifier Table
  • B. Terminal Table
  • C. Literal Table
  • D. None of the mentioned

22) The segment base is specified using the register named is?

  • A. SEGMENT instruction
  • B. ASSUME instruction
  • C. ORG instructions
  • D. TITLE instruction

23) The segment base is specified using the register named is?

  • A. SEGMENT instruction
  • B. ASSUME instruction
  • C. ORG instructions
  • D. TITLE instruction

24) Software that measures, monitors, and controls events are ___________

  • A. Real Time software
  • B. Scientific software
  • C. System S/w
  • D. Business Software

25) The table created by lexical analysis to describe all literals used in the source program is

  • A. Identifier table
  • B. Terminal table
  • C. Literal table
  • D. Reductions

26) Which loader function is accomplished by loader?

  • A. Loading
  • B. Linking
  • C. Reallocation
  • D. Allocation

27) Which is not true about syntax and semantic parts of a computer language?

  • A. Semantics is checked mechanically by a computer
  • B. Semantics is the responsibility of the programmer
  • C. All of the mentioned
  • D. None of the mentioned

28) The specific task storage manager performs ____________

  • A. Allocation/ deal location of programs
  • B. Allocation/ deal location of programs & protection of storage area assigned to the program
  • C. Protection of storage area assigned to the program
  • D. none of the mentioned

29) In which of the following no information hiding is done ?

  • A. compile prog 1, prog 2
  • B. run test, prog
  • C. load R1 , A
  • D. 001001000010101

30) The identification of common sub-expression and replacement of run-time computations by compile-time computations is

  • A. loop optimization
  • B. local optimization
  • C. Constant folding
  • D. data flow analysis

31) The identification of common sub-expression and replacement of run-time computations by compile-time computations is

  • A. loop optimization
  • B. local optimization
  • C. Constant folding
  • D. data flow analysis

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

  • A. DAG
  • B. control graph
  • C. Flow graph
  • D. Hamiltonion graph

33) Scissoring enables

  • A. entire data to be displayed
  • B. full data display on full area of screen
  • C. a part of data to be displayed
  • D. no data to be displayed

34) Relocation bits used by relocating loader are specified by

  • A. external data segments
  • B. external sub-routines
  • C. data located in other procedure
  • D. all of these

35) Relocation bits used by relocating loader are specified by

  • A. relocating loader itself
  • B. assembler
  • C. linker
  • D. macro processor

36) Which of the following module does not incorporate initialization of values changed by the module ?

  • A. serially reusable module
  • B. non reusable module
  • C. re-enterable module
  • D. all of these

37) Three address code invloves

  • A. exactly 3 address
  • B. at the most 3 address
  • C. no unary operators
  • D. none of these

38) Advantage of panic mode of error recovery is that

  • A. it is simple to implement
  • B. it never gets into an infinite loop
  • C. both (a) and (b)
  • D. none of these

39) A relocatable program form is one which

  • A. 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
  • B. consists of a program and relevant information for its relocation
  • C. can be processed to relocate it to a desired area of memory
  • D. all of these

40) Function of the storage assignment is

  • A. assign storage to all variables referenced in the source program
  • B. assign storage to all temporary locations that are necessary for intermediate results
  • C. assign storage to literals, and to ensure that the storage is allocated and appropriate locations are initialized
  • D. all of these

Compiler Design Online Test Questions (Compiler Design FAQs)

1) What is Linker?

The linker is a program used to link different pieces of code, modules in order to obtain an executable code.

2) What is an assembler?

An assembler is a program used to convert assembly language into machine language.

3) What is code optimization in compiler design?

In code optimization the code is improvised that is it is optimized so that it can use fewer resources and time while execution.

4) What is Lexical Analysis?

Lexical analysis is the first phase of compiler designing which takes the source code from the input and breaks it into tokens by removing whitespaces and special characters.

5) What is Symbol Table in Compiler?

In compiler design, the Symbol table is an important data structure created and maintained by compilers in order to store and track information about the occurrence of various entities such as variable names, function names, objects, classes, interfaces, etc.

6) Explain three address code in Compiler?

Three address code is an intermediate code that can be easily generated and converted to machine code. It uses at most three addresses and one operator to represent an expression. The value computed at each instruction is stored in a temporary variable generated by the compiler.

7) What is BNF Notation?

BNF stands for Backus-Naur Form which is used to write a formal representation of context-free grammar. It is a variant of context-free grammar.

8) What is a garbage is in compiler design?

The resources in memory that will never be accessed after a certain time and is of no use are known as garbage value.

9) What does LR stands for in compiler design?

LR stands for L- left to right and R- rightmost derivation in reverse parsing. It is used for parsing the large class of grammars.

10) Explain Context free grammar?

CFG or Context-Free Grammar is used to generate all possible strings in a formal language. It can be defined by four tuples, G= (V, T, P, S).

11) What is yacc in compiler design?

12) Explain input buffering in compiler design?

13) What is lexical analysis in compiler design?

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
May
Java MCQ
01st
May
Sql Server MCQ
01st
May
Azure MCQ