Compiler Design MCQ

Compiler Design MCQ

  • Admin
  • 03rd Feb, 2023

Take Compiler Design MCQ Quiz to Test Your Knowledge 

Practice here the best 35+ Compiler Design MCQ Questions, that check your basic knowledge of Compiler Design. These MCQs are written by industry experts & asked mostly during compiler design jobs & interviews.

Compiler Design MCQ

1) A optimizing compiler

  • A. Is optimized to take less time for execution
  • B.Optimized the code
  • C.Is optimized to occupy less space
  • D.None of the mentioned

2) Which of the following actions an operator precedence parser may take to recover from an error?

  • A. Delete symbols from the stack
  • B.Insert symbols onto the stack
  • C.Inserting or deleting symbols from the input
  • D.All of the mentioned

3) Shift reduce parsers are

  • A. Bottom up parser
  • B.Top down parser
  • C.Top down parserMaybe both
  • D.None of the mentioned

4) Which of the following is used for grouping of characters into tokens?

  • A. Parser
  • B.Code generator
  • C.Lexical analyser
  • D.Code generator

5) In a compiler, keywords of a language are recognized during -

  • A. the code generation
  • B.parsing of the program
  • C.the lexical analysis of the program
  • D.dataflow analysis
Download Free : Compiler Design MCQ PDF

6) Compiler translates the source code to

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

7) What is the output of lexical analyzer?

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

8) How many parts of compiler are there?

  • A. 8
  • B.4
  • C.2
  • D.1

9) ......................is a process of finding a parse tree for a string of tokens.

  • A. Analysing
  • B.Recognizing
  • C.Tokenizing
  • D.Parsing

10) Compiler can check ________ error.

  • A. Syntax
  • B.Content
  • C.Logical
  • D.Both A and B

11) ......................is the most general phase structured grammar.

  • A. Regular
  • B.Context free
  • C.Context sensitive
  • D.All of these

12) A _________ is a software utility that translates code written in higher language into a low level language.

  • A. Text editor
  • B.Compiler
  • C.Converter
  • D.Code optimizer

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

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

14) When a computer is first turned on or resrarted, a special type of absolute loader is executed called

  • A. Boot strap loader
  • B." Compile and GO " loader
  • C.Relating loader
  • D.Boot loader

15) When a computer is first turned on or resrarted, a special type of absolute loader is executed called

  • A. Boot strap loader
  • B." Compile and GO " loader
  • C.Relating loader
  • D.Boot loader

16) A self-relocating program is one which

  • A. consists of a program and relevant information for its relocation
  • B.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
  • C.can itself perform the relocation of its address sensitive portions
  • D.all of these

17) 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

18) which is the permanent data base in the geneal model of Compiler ?

  • A. identifier table
  • B.literal table
  • C.terminal table
  • D.source code

19) which of the following parsers is the most powerful ?

  • A. Operator - precedence
  • B.LALR
  • C.SLR
  • D.Canonical LR

20) What is the output of lexical analyzer?

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

21) The literal definition of a word is also called its ______.

  • A. Details
  • B.Denotation
  • C.Diction
  • D.None of above

22) Bottom-up processing involves the .................

  • A. brain tuning in to select information
  • B.brain's ability to integrate several stimuli simultaneously
  • C.brain's use of incoming signals to construct perceptions
  • D.brain imposing its own structure on incoming information based on previous experience

23) The output of the compiler is called ................

  • A. Program
  • B.Source code
  • C.Object code
  • D.Linked code

24) Java compiler translates java source code into ________.

  • A. Object file
  • B.Byte Code
  • C.Library files
  • D.Executable files

25) The process by which program code is converted into machine language is called ................

  • A. execution
  • B.compilation
  • C.documentation
  • D.variable declaration

26) which of the following is not constructed by a typical compiler?

  • A. Parse tree
  • B.Source code
  • C.Symbol table
  • D.Object program

27) A(n) ________ is a set of instructions that the computer follows to solve a problem.

  • A. Linker
  • B.Program
  • C.Operator
  • D.Compiler

28) Absolute code can be generated for ..................

  • A. load-time binding
  • B.interrupt binding
  • C.compile-time binding
  • D.execution-time binding

29) In a compiler keywords of a language are recognized during .................

  • A. dataflow analysis
  • B.the code generation
  • C.parsing of the program
  • D.the lexical analysis of the program

30) which of the following two keywords cannot come together when declaring a method ..............

  • A. static and final
  • B.final and abstract
  • C.static and abstract
  • D.All of the Above

31) The Output Of A Lexical Analyzer Is

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

32) Which One Of The Following Is FALSE?

  • A. A basic block is a sequence of instructions where control enters the sequence at the beginning and exits at the end
  • B.Available expression analysis can be used for common subexpression elimination
  • C.Live variable analysis can be used for dead code elimination
  • D.x = 4 ∗ 5 => x = 20 is an example of common subexpression elimination

33) What Is Machine Code?

  • A. Instructions and data in binary
  • B. Serial number of the CPU
  • C.Instructions and data in human readable form
  • D.Instructions and data in assembly code mnemonics

34) Which Of The Following System Software Resides In The Main Memory Always

  • A. Text Editor
  • B.Assembler
  • C.Linker
  • D.Loader

35) A Parse Tree Showing The Value Of Attributes At Each Node

  • A. annotated parse tree
  • B.syntax tree
  • C.semantic tree
  • D.all of the above

36) What Does A Syntactic Analyser Do?

  • A. Maintain Symbol Table
  • B.Collect type of information
  • C.Create parse tree
  • D.None of the mentioned

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

Appium MCQ
Fortran MCQ