Sunday 28 May 2017

Interview / Viva Questions on Compiler Design

                          Following are the questions on "Compiler Design" generally asked in interviews. Go through them:

1. What is Compiler?

What is Editor, Preprocessor, Compiler, Assembler?

What is Linker and Loader?

4. What is the difference between Compilers and Interpreters?

What is Cross Compiler?

What are the six phases of compilation?

Explain all phases of compilation with one sample example.  

8. Explain phases of compiler with respect to Front End and Back End of Compiler. 

9. What is the necessity of Intermediate code generation phase of compilation?

10. What is Symbol Table? 

11. Which data structures are used in Symbol Table?
Ans: Linear List, Search Tree, Hash Table

12. What is Lexeme? Give Examples.

13. What is Token? Give Examples.

What are three parts of Lex program? 

What is use of yywrap?

16. What is the use of yylex() function in Lex? 

17. What are three parts of Yacc program? 

What is the use of yyparse? 

19. What is yytext, yyleng, yylval?

20. What is Ambiguous grammar? What is the necessity to avoid ambiguity in grammar?

21. What is the difference between item and production?

22. Write intermediate code for a=b+c*d.

23. Explain Quadruple, Triple and Indirect Triple.

24. Tell some patterns for code optimization.

25. What is DAG? How intermediate code can be shown in terms of DAG?

26. Explain labelling algorithm for code generation?

Explain algorithm for Generating Assembly Code from DAG.

What is abstract syntax tree? Explain with example.

29. How recursive descent parser(RDP) works?

What are the different types of parsers?

What is the meaning of each letter in LR(0)?

Basic difference between LR(0) and SLR(1)?

What is difference between Top down and Bottom up parsing?

What is difference between LR(0) item and LR(1) item?

35. What is FIRST of a grammar? What is FOLLOW of a grammar? How to find them?

                     Ask your Question related to Compiler Design as a Comment in following Textbox.

                    You can Answer the already asked Question as reply to the Question. 

(Note: Your Question/Answer will be added after validation)


No comments:

Post a Comment