9. What is a characteristic of a compiled language?
Answer: C
Compiled languages run faster than interpreted languages.
Compiled languages are designed to convert code into machine language before execution, which typically results in faster execution times compared to interpreted languages that translate code on the fly.
A) Outputs an interpreter to run the program
This option is incorrect as compiled languages do not output an interpreter; instead, they generate machine code that can be executed directly by the hardware. An interpreter is associated with languages that are executed line-by-line rather than pre-compiled.
B) Runs easily on different kinds of machines
This statement is not accurate for compiled languages, as they are often platform-specific. Compiled code is tailored to a particular architecture, requiring recompilation for different machines, which contrasts with interpreted languages that can run on any machine with the appropriate interpreter.
C) Runs faster than interpreted languages
Compiled languages generally achieve faster execution than interpreted languages because the code is translated into machine language in advance, allowing the program to run more efficiently without the overhead of runtime interpretation.
D) Runs right away without first compiling
This option is incorrect as it describes the behavior of interpreted languages. Compiled languages require a separate compilation step before the program can be executed, which distinguishes them from languages that can be run immediately.
Conclusion
The correct answer, that compiled languages run faster than interpreted languages, highlights the efficiency gained through pre-execution compilation. Other options fail to accurately describe characteristics of compiled languages, reinforcing the distinction between compiled and interpreted programming paradigms.