info@jobexams.pk

MCQ Detailed View

Explore the question in detail with explanation, related questions, and community discussions.

1 PROGRAMMING MCQS

The function of a compiler?

  • To convert high-level code to machine code
  • To design websites
  • To manage memory
  • To create databases
Correct Answer: A. To convert high-level code to machine code

Detailed Explanation

A compiler is a special program that translates code written in a high-level programming language (like C, C++, or Java) into machine code (binary code) that a computer’s processor can understand and execute. This process is essential because computers do not understand human-readable programming languages directly. They can only execute instructions written in their native language, which is machine code made up of 0s and 1s.


The main function of a compiler is to go through the entire source code, check it for errors, and then convert it into an executable file. This allows programs to run independently without needing the original source code every time.

Discussion

Thank you for your comment! Our admin will review it soon.
No comments yet. Be the first to comment!

Leave a Comment