Compiler Design exam short question and answer

Genius Learner
2 min readAug 21, 2020

--

  1. What is compiler?

The compiler is a program that reads a program written in one language which is known as source language or source code and converts it into another language known as machine language is called compiler .

2) State some software tools that manipulate source program?

>> structure editors

>> pretty printers

>> static checkers

>> Interpreters

3) What are the cousins of compiler?

>> Pre — processor

>> Assembler

>> Loaders

>> Link editors

4) What are the main two parts of compilation ? what are they performing the two main parts are.

Analysis parts: It breaks up the source program into constituent pieces and create an intermediate representation of the source program.

Synthesis part : It constructs the desired target program from the intermediate representation.

5) How many phases dose analysis consists?

The analysis of source program is divided into mainly three phases. They are -

>> Linear analysis

>> Hierarchical Analysis

>> Semantic Analysis

6) What linear analysis do ?

It involves a scanner which read stream of character from left to right. It is then grouped into various tokens having collective meaning.

7) What Hierarchical Analysis do?

Based on collective meaning , the character or tokens are categorized or grouped hierarchically into nested groups.

To see more 20 question and answer click here — — —

--

--

Genius Learner
Genius Learner

Written by Genius Learner

I am an teacher on online and and offline . Love to teach everyone.

No responses yet