Skip to content
GK24
Computer AwarenessEasy

Which of the following translates a high level language program line by line and stops at the first error?

  1. A.Compiler
  2. B.Assembler
  3. C.Interpreter
  4. D.Linker

Correct answer

C. Interpreter

Explanation

The correct answer is C, interpreter. An interpreter reads one statement of the high level program, translates it into machine code and executes it immediately before moving to the next statement. Because it never looks at the whole program in advance, it halts as soon as it meets an error, which makes debugging easy but repeated execution slow.

Option A, a compiler, translates the entire source program in one operation, produces an object file and reports all the errors of the program together, so the translated code runs faster afterwards. Option B, an assembler, is a translator too, but it works only on assembly language, converting mnemonic instructions into machine code. Option D, a linker, does not translate at all; it joins separately compiled object modules and library routines into a single executable file.

Read the full article: Software and Operating Systems: Types, Functions and MCQs

View all
Q3.Computer AwarenessMedium

Which scheduling algorithm allots a fixed time slice to every process in rotation and is therefore used in time sharing systems?

  1. A.First Come First Served
  2. B.Shortest Job First
  3. C.Round Robin
  4. D.Priority scheduling
Show answer
Correct answer: C. Round Robin

In Round Robin scheduling every ready process is given the processor for a fixed period called the time quantum, and when that period expires the process is moved to the back of the queue and the next one is served.