๐Ÿ’ก Activity Solution

๐Ÿ’ก Activity Solution


1๏ธโƒฃ Compiler:

  • A program that translates the entire source code into object code (machine code) before execution.
    It checks for errors during the build stage; if none exist, it produces an .exe file through linking.


2๏ธโƒฃ Interpreter:

  • A program that reads and executes source code line-by-line.
    If it finds an error, it stops immediately and shows an error message.
    It does not create or save any .exe file.


3๏ธโƒฃ Assembler:

  • A translator that converts assembly language instructions into machine language (binary).


4๏ธโƒฃ Linker:

  • A tool that combines object code and required libraries to produce an executable (.exe) file.


5๏ธโƒฃ .exe file:

  • A file containing machine code instructions ready to be loaded and executed by the CPU.


6๏ธโƒฃ Loader:

  • A system program that loads the executable (.exe) into main memory (RAM) so the CPU can run it.


7๏ธโƒฃ Which is faster:

  • Compiled languages are faster because their code is translated to machine code in advance, not during execution.


8๏ธโƒฃ Does Interpreter produce .exe?

  • โŒ No, an interpreter does not generate or store an .exe file.


9๏ธโƒฃ Does Interpreter save machine code?

  • โŒ No, it executes directly in memory without saving machine code on disk.


๐Ÿ”Ÿ Does Compiler produce .exe?

  • โœ… Yes, after translation and linking, a compiler produces an .exe file stored on disk.


1๏ธโƒฃ1๏ธโƒฃ Does Compiler save machine code?

  • โœ… Yes, it saves machine code as part of the executable file for later use.


Complete and Continue  
Discussion

0 comments