Discuss Forum
1. What is the purpose of a compiler in programming?
- A. To convert source code into machine code
- B. To convert source code into machine code
- C. To convert source code into machine code
- D. To convert source code into machine code
Answer: Option A
Explanation:
The purpose of a compiler in programming is to convert source code into machine code.
- Source code: This is the human-readable code written by a programmer in a high-level language like C, Python, or Java.
- Machine code: This is the low-level language that the computer's CPU directly understands and executes. The compiler translates the source code into machine code, allowing the computer to run the program.
Post your comments here: