CD Lab Viva Questions
CD Lab Viva Questions
1. What is a compiler?
A compiler is a program that reads a program written in one language –the source
language and translates it into an equivalent program in another language-the target language.
The compiler reports to its user the presence of errors in the source program.
2. What are the two parts of a compilation? Explain briefly.
Analysis and Synthesis are the two parts of compilation. The analysis part breaks up the
source program into constituent pieces and creates an intermediate representation of the source
program.
The synthesis part constructs the desired target program from the intermediate
representation.
3. List the subparts or phases of analysis part.
Analysis consists of three phases:
Linear Analysis.
Hierarchical Analysis.
Semantic Analysis.
4. Depict diagrammatically how a language is processed.