400 Top Compiler Design Lab Viva Questions and Answers
400 Top Compiler Design Lab Viva Questions and Answers
400 Top Compiler Design Lab Viva Questions and Answers
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
HOME Interview Questions MCQs *LAB VIVA CLASS NOTES SEMINAR TOPICS
ONLINE TEST GATE CAT Internship ABOUT US Privacy Policy
Be Competitive Or Compro
GeeksforGeeks
GeeksforGeeks
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 1/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
Linear Analysis.
Hierarchical Analysis.
Semantic Analysis.
Preprocessor
Source program
Compiler
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 2/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
Assembler
1. Lexical Analyzer
2. Syntax Analyzer
3. Semantic Analyzer
4. Intermediate code generator
5. Code optimizer
6. Code generator
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 3/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
1. Single- pass
2. Multi-pass
3. Load-and-go
4. Debugging or optimizing
Preprocessors
Assemblers
Loaders and Link-Editors
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 4/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
Code optimization
Code generation, along with error handling and symbol- table
operations.
1. Parser generators
2. Scanner generators
3. Syntax-directed translation engines
4. Automatic code generators
5. Data-flow engines
Union – L U M ={s | s is in L or s is in M}
Concatenation – LM ={st | s is in L and t is in M}
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 5/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 6/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
1. Specification of syntax
2. Representation of input after parsing.
Simpler design.
Compiler efficiency is improved.
Compiler portability is enhanced.
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 7/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 8/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
i.e. both leftmost and rightmost derivations are same for the given
sentence.
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 9/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
Backtracking
Left recursion
Left factoring
Ambiguity
FOLLOW
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 10/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
Advantages
Disadvantages
| other
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 11/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
A→.XYZ
A→X.YZ
A→XY.Z
A→XYZ.
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 12/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 13/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
Syntax tree
Postfix
Three address code
t1 := not c
t2 := b and t1
t3 := a or t2
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 14/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
E.true := new_label()
E.false :=S.next
S1.next :=S.next
2. S → if E then S1 else S2
E.true := new_label()
E.false := new_label()
S1.next :=S.next
S2.next :=S.next
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 15/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
DAG is used in
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 16/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
MOV R0,R1 1
MOV R1,M 2
SUB 5(R0),*10(R1) 3
Eg. t1:=a*5
t2:=t1+7
t3:=t2-5
t4:=t1+t3
t5:=t2+b
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 17/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
Static allocation
Stack allocation
Heap allocation
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 18/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
Temporary variables
Local variables
Saved machine registers
Control link
Access link
Actual parameters
Return values
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 19/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
1. Call by value
2. Call by reference
3. Copy-restore
4. Call by name
------>>[MOST IMPORTANT]<<------
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 20/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
san
MARCH 5, 2016 AT 10:26 AM
very easy
REPLY
LEAVE A REPLY
Your email address will not be published. Required fields are marked *
Comment
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 21/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])
lOMoARcPSD|27297855
11/17/21, 1:50 PM 400+ TOP COMPILER DESIGN LAB VIVA Questions and Answers
Name *
Email *
Website
Post Comment
https://engineeringinterviewquestions.com/compiler-design-viva-questions-and-answers/ 22/22
Downloaded by VENKATA SAI PRASAD PULAPARTHI ([email protected])