In: Computer Science
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.