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?


2. 
What is Editor, Preprocessor, Compiler, Assembler?

3. 
What is Linker and Loader?


4. What is the difference between Compilers and Interpreters?

5. 
What is Cross Compiler?


6. 
What are the six phases of compilation?

7. 
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.

14. 
What are three parts of Lex program? 


15. 
What is use of yywrap?

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


17. What are three parts of Yacc program? 

18. 
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?


27. 
Explain algorithm for Generating Assembly Code from DAG.

28. 
What is abstract syntax tree? Explain with example.


29. How recursive descent parser(RDP) works?


30. 
What are the different types of parsers?


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


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


33. 
What is difference between Top down and Bottom up parsing?


34. 
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