engineering computer science MCQ #1212

What is the primary function of a compiler?

engineering computer science MCQ #1212

  1. Question 1

    Q1. What is the primary function of a compiler?

    • A) To translate source code into machine code
    • B) To execute source code directly
    • C) To debug source code
    • D) To optimize source code

    Answer: To translate source code into machine code

    Explanation: A compiler translates source code into machine code that the computer's processor can execute directly, a process essential for programming.