1. What is the primary function of a compiler in programming?
- A) To convert high-level language into machine code
- B) To check the code for errors
- C) To execute the code
- D) To optimize the code for performance
Answer: A) To convert high-level language into machine code
Rationale: A compiler translates written code from a high-level
programming language to a lower-level language, typically machine code,
so that it can be executed by the computer.
2. Which of the following is a characteristic of an interpreted language?
- A) It is compiled into machine code before execution.
- B) It is executed line by line at runtime.
- C) It is not suitable for scripting tasks.
- D) It requires manual memory management.
Answer: B) It is executed line by line at runtime.
Category | WGU EXAM |
Comments | 0 |
Rating | |
Sales | 0 |