Which of the following translates a high level language program line by line and stops at the first error?
- A.Compiler
- B.Assembler
- C.Interpreter
- D.Linker
Correct answer
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
Practice Questions
View allWhich of the following is the core part of an operating system that always remains in main memory?
- A.Shell
- B.Kernel
- C.Compiler
- D.Loader
Show answer
The kernel is the central part of the operating system and is the portion that is loaded at boot time and stays resident in main memory for as long as the computer is running.
Read the full explanation →Which type of software is permanently stored on a chip and is required before any other program can run?
- A.Application software
- B.Utility software
- C.Firmware
- D.Freeware
Show answer
Firmware is software written permanently into a read only memory chip at the time of manufacture.
Read the full explanation →Which scheduling algorithm allots a fixed time slice to every process in rotation and is therefore used in time sharing systems?
- A.First Come First Served
- B.Shortest Job First
- C.Round Robin
- D.Priority scheduling
Show answer
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.
Read the full explanation →UNIX operating system was developed in 1969 at which organisation?
- A.Bell Laboratories
- B.IBM
- C.Microsoft
- D.Apple
Show answer
UNIX was developed in 1969 at Bell Laboratories by Ken Thompson and Dennis Ritchie, and it became the model for almost every multi user operating system that followed.
Read the full explanation →The situation in which two processes each hold a resource the other needs and neither can proceed is called
- A.Thrashing
- B.Deadlock
- C.Spooling
- D.Fragmentation
Show answer
Deadlock is the state in which every process in a set is waiting for a resource that another process in the same set is holding, so none of them can ever move forward without the operating system stepping in.
Read the full explanation →