Comp 212 Assignment 2
Comp 212 Assignment 2
ORMOC CAMPUS
Brgy. Don Felipe Larrazabal, Ormoc City, Philippines
Assignment #2
Loila S. Empimo
Instructor’s name
1. What is Computer programming?
Compilers:
Advantages
Efficiency: Description Generates optimized machine code, resulting
in quicker execution times.
Error Checking: Extensive error checking is performed during
compilation to reduce runtime errors.
Stand-Alone Executables: Creates standalone executable files that
do not require the compiler to be present during execution.
Disadvantages
Compilation Time: It takes time to compile the complete code before
execution, which might be sluggish for big programs.
Complex Debugging: Debugging can be more difficult since mistakes
are detected after the complete program has been built.
Interpreters:
Advantages
Immediate Execution: Executes code line by line, which is beneficial
for development and testing because changes can be tested fast.
Ease of Debugging: Errors are captured at runtime, which provides
instant feedback and makes debugging easier.
Disadvantages
Performance: Translation takes place on-the-fly, hence execution is
often slower than with compiled code.
Dependency: The interpreter must be installed on the system where
the code runs.
Assemblers:
Advantages
Direct Hardware Control: Enables precise control over hardware
resources as well as efficient system resource use.
Optimized Code: Creates machine code that is highly optimized for
specific hardware.
Disadvantages
Complexity: Assembly language is low-level, which can be more
complex and harder to learn and use than high-level languages.
Portability: Machine code is frequently specialized to a single
processor architecture, making it less transferable across computers.