Question

In: Computer Science

List one very major difference between a compiler and an interpreter? What a major role does...

List one very major difference between a compiler

List one very major difference between a compiler and an interpreter? What a major role does the intermediate code play in a compiler? What does an assembler do? What does a linker do?

Solutions

Expert Solution

Please find the answers below :

1a)

One of the main difference between a compiler and interpreter is that compiler scans and translates the whole program into machine code at once, whereas the interpreter will translate program one statement at a time. Also in interpreter there is no intermediate code is getting generated, but in compiler they usually do generate some kind of intermediate files hence they are not much memory efficient as interpreters.

1b)

If we are tranlsating the source code directly to the target machine code, then for every target machine a full native compiler is necessary to do the action, whereas an intermediate code will eliminates the need of a full compiler for every new machine.

1c)

An assembler is a computer program that interprets computer programs written in assembly language to machine language.

1d)

A Linker is also a computer program which collects the compiler generated files and links the dependency specified inside the file and generate a single executable file or a library file.


Related Solutions

what role does the symbol table play in compiler when it is created
what role does the symbol table play in compiler when it is created
7. What role does the symbol table play in a compiler? When is it created?
7. What role does the symbol table play in a compiler? When is it created? 8. What are two unique advantages of implementing a language with a runtime interpreter i.e. scheme, python) versus a standalone executable file (i.e. C, C++)? 
Please answer with a fully detailed solution with examples. Difference between interpretive and compiler languages? What...
Please answer with a fully detailed solution with examples. Difference between interpretive and compiler languages? What are the four pillars of OOP and provide a simple example for each and code as well? What is the highest superclass in Java and why and what are the other ones and explain them as well. Describe the components involved in the processing of one web request.
What is the role of takeovers in corporate governance? How does asymmetric information between very knowledgeable...
What is the role of takeovers in corporate governance? How does asymmetric information between very knowledgeable corporate insiders and less knowledgeable, but rational, outside investors discourage raising equity through selling new shares to the public?
Using the viewpoint or perspective of one of the six major theories of socialization,what role does...
Using the viewpoint or perspective of one of the six major theories of socialization,what role does the media play in our lives? What role does the media play in shaping our personalities?
What is the difference between financial planning and strategic planning? What role does each play? Imagine...
What is the difference between financial planning and strategic planning? What role does each play? Imagine you are responsible for the strategic planning process and need to form a team. Who will be on your team and why? Explain each person's function. Once your strategic plan is written, what happens next? Make sure you address each question and provide examples.
What is an array-based list? What is a resizable list? What is the difference between a...
What is an array-based list? What is a resizable list? What is the difference between a list’s capacity and its size? When a list is expanded, is the size changed or is its capacity changed?
What is the difference between a one-photon and multiphoton process? Why does the use of lasers...
What is the difference between a one-photon and multiphoton process? Why does the use of lasers make it favorable to observe, say, a two-photon process?
a) Explain the difference between a desktop and an all-in-one. What additional meaning does the term,...
a) Explain the difference between a desktop and an all-in-one. What additional meaning does the term, desktop, sometimes have? b) Describe components of a backup plan. How do backup plans for mobile devices and personal computers differ? c) Describe strategies that support green computing.
What does it mean to say the left hemisphere is the "Interpreter." Fully describe and explain...
What does it mean to say the left hemisphere is the "Interpreter." Fully describe and explain the study that shows the left hemisphere is the "interpreter" compaired to the right hemisphere. (what are the variables? how is the right hemisphere different than the left?) Trace the path of the information from the stimuli t the hemisphere. How does the study show the left hemisphere is the interpreter?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT