Question Detail

COM 101 Computer Software and Programming Languages Objective Question

Question

What is the function of a compiler?
Options
A To convert assembly language program to machine language.
B To convert a high-level language program to machine language line by line.
C To convert the whole high-level language program to machine language at once.
Correct Answer
D To manage files and memory in an operating system.
Correct Answer

Option C is the correct answer.

Detailed Explanation

A compiler is a language translator that converts the whole high-level language program (HLLP) to machine language at a time. This is different from an interpreter, which translates line by line.

Hint

This translator processes the entire source code in one go, creating an executable machine code file.

Question Info