Compiler Cheat Sheet

If you are a system programmer then chances are high that you will be asked some compiler questions. This cheat sheet gives you a small overview of compiler interview questions. 

Compiler translates a human readable file to the computer readable file. Here are few things to remember about compiler:

  1. Compiler programs can also be specialized. Certain language structures are better suited for a particular task than others, so specific compilers were developed for specific tasks or languages. Some compilers are multistage or multiple pass. A first pass could take a very natural language and make it closer to a computer understandable language. A second or even a third pass could take it to the final stage, the executable file. 
  2. A compiler is a special type of computer program that translates a human readable text file into a form that the computer can more easily understand
  3. It converts from source code to object code. 
  4. Converts the high level language(Java, C, C++) into low level language(assembly language or machine code).
  5. Decompiler converts from low level to high level language.
  6. 'Language translator' or 'source to source translator' or 'language convertor' converts  between high level languages.
  7. Language rewriter - Translates the form of expressions without a change of language. Finally an executable is created.
  8. Intermediate output in a multistage compiler is usually called pseudo-code. 
  9. Errors that limit compilers in understanding a program are called syntax errors.
  10. Error in program functioning are called logic errors
  11. Cross compiler allows the text file(set of instructions) written for 1-computer to be compiled and run on a different computer(manufacturer)
  12. Compiler operations: Lexical analysis, preprocessing, parsing, semantic analysis, code generation, code optimization
  13. 'Compiler-compiler' or 'Parser generator' - Helps to create a compiler


You might also like
C Cheat Sheet
Shell programming Cheat Sheet
C++ Cheat Sheet

No comments:

Post a Comment

NoSQL

This one is reviewed but I need to delete its copy from hubpages or somewhere NoSQL Data models: key-value  Aggregate model.  key or i...