COMPILER - INTERPRETER - ASSEMBLER WITH PYQS OF UGC NET EXAM.
TRANSLATOR
· Translator converts a computer program code from one computer language into another.
· There are 3 different types of translators as follows:
1. Compiler
2. Interpreter
3. Assembler
COMPILER
· A compiler is a software program.
· Converts high level language into binary code i.e. machine code.
· Transforming source code into machine code is called compilation.
· The source code is transformed into machine code in a single step.
INTERPRETER
· An interpreter is a software program.
· Converts high level language line-by-line into low level language.
· If any error is reported, the interpreter stops working.
.
ASSEMBLER
.· Assembler is a computer program.
· Converts low-level language i.e. assembly language into binary code
i.e. machine code.
· Compilation of the assembly language only.
· Assembler generates a code for the loader.
· Assembler is having the mnemonics or symbols in the instruction.
Practice Questions: -
Question - 01
High level programming language can be converted into machine language by using which of the following?
(1) Oracle
(2) Compiler
(3) Matlab
(4) Assembler
Answer :( 2) Compiler.
Question - 02
A computer program that translates program statements into machine language statements is called
(1) Compiler
(2) Simulator
(3) Translator
(4) Interpreter
Answer: (4) Interpreter.
Question - 03
___________Converts a program written in assembly language into machine instructions.
(1) Machine compiler
(2) Interpreter
(3) Assembler
(4) Converter
Answer: (3) Assembler.
Question - 04
A compiler is software which converts
(1) Characters to bits
(2) High level language to machine language
(3) Machine language to high level language
(4) Words to bits
Answer: (2) High Level Language to machine Language.
Question - 05
Which language translator does not convert source code into machine code?
1. Assembler
2. Compiler
3. Interpreter
4. None of the them
Answer: (3) Interpreter.
Question - 06
What is meant by source code?
1. The final executable program
2. The code written by the programmer
3. The additional information about errors
4. Code relating to sources of information on the internet
Answer: (2) The code written by the programmer.
Question - 07
___________is not used to translate High Level Languages?
1. Assembler
2. Compiler
3. Interpreter
4. Operating System
Answer: (1) Assembler.
Question - 08
Translates the entire source code in one step:
1. Assembler
2. Compiler
3. Debugger
4. Interpreter
Answer: (2) Compiler.
Question - 09
The translator stops when it encounters an error:
1. Assembler
2. Database
3. Compiler
4. Interpreter
Answer: (4) Interpreter.
Question 10
Which language translator produces Object Code and an Error Report?
1. Assembler
2. Compiler
3. Interpreter
4. All of them
Answer: (2) Compiler.
Post a Comment