Comp chap 8

A compiler is—

Verified Answer
A. A program which translates an assembly language program into machine language
B. Any program written in machine language
C. A program which translates a high level language into machine language
D. A program which translates a program written in a high level language to another high level language

Explanation:

A compiler is a special program translating source code from a high-level language (e.g., C++, Java) into machine code (binary instructions) that a computer's processor can directly execute. This translation happens before execution. Option (a) describes an assembler, for assembly language. Option (b) describes a program *already* in machine language. Option (d) describes a transpiler, translating between high-level languages, not to machine code. Thus, 'A program which translates a high level language into machine language' is the most accurate definition of a compiler's primary function.