187k views
1 vote
Language hierarchy: The purpose of a compiler is to...

1) Translate high-level programming language code into machine code
2) Execute the program line by line
3) Optimize the code for better performance
4) Debug the program for errors

1 Answer

5 votes

Final answer:

A compiler is a program that translates high-level programming language code into machine code so that a computer can execute the instructions.

Step-by-step explanation:

A compiler is a program that translates high-level programming language code into machine code. It takes the code written by a programmer and converts it into a form that a computer can understand and execute. The purpose of a compiler is to facilitate the execution of the program by translating it into a language that the computer's hardware can process.

User Takrliu
by
8.1k points