What is the function of a compiler? MCQ with Answer and Explanation

What is the function of a compiler?
A. Executes code without translation
B. Translates high-level code to machine code all at once
C. Translates line by line
D. Optimizes storage
Answer: Option B
Solution (By JKSSB Mock Tests)
A compiler translates the entire source code of a program into machine code before execution.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Computer Fundamentals Questions

Question #1
Which early calculating aid invented by John Napier used a set of numbered ivory rods to simplify complex multiplication and division tasks?
A. Slide Rule
B. Abacus
C. Napier's Bones
D. Pascaline

Correct Answer: Option C


Explanation:
John Napier invented 'Napier's Bones' in 1917, using carved rods to convert multiplication problems into simple addition steps.

This question belongs to: Computer Computer Fundamentals
Question #2
What is the purpose of the power supply unit (PSU) in a computer?
A. Converts AC to DC and provides power
B. Processes graphics
C. Stores data permanently
D. Manages data transfer

Correct Answer: Option A


Explanation:
The PSU converts alternating current (AC) from the wall outlet to direct current (DC) for computer components.

This question belongs to: Computer Computer Fundamentals
Question #3
What is the decimal equivalent of binary 1101?
A. 12
B. 15
C. 14
D. 13

Correct Answer: Option D


Explanation:
1101 = 8+4+1 = 13.

This question belongs to: Computer Computer Fundamentals