What is the primary function of a C++ compiler?

Options

  • A. To translate source code into a target representation
  • B. To design computer hardware
  • C. To manage internet connections only
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

A. To translate source code into a target representation

Detailed Explanation

Correct Answer: A — To translate source code into a target representation.

Explanation: A C++ compiler translates source code into machine code, object code, assembly code or an intermediate representation, depending on the compiler and its configuration.