Here we are trying to collect MCQ (Multiple Choice Question) of Language Processor/ Translator for Educational purpose.
A language translator is system software that converts statement written in one language to statement in another language such as from high level or assemble language to machine language. It performs tasks, such as translating and interpreting, required for processing a specified programming language. There are three types of translators: Assembler, Compiler, and Interpreter.
A program written in high-level language is called as source code. To convert the source code into machine code, translators are needed. A translator takes a program written in source language as input and converts it into a program in target language as output.
Compiler is a translator which is used to convert programs in high-level language to low-level language. It translates the entire program and also reports the errors in source program encountered during the translation.
Compiler is a computer program that translates code written in a high level language to a low level language, object/machine code.
The most common reason for translating source code is to create an executable program (converting from high level language into machine language).
- It is not involved in program execution.
- C, C++, FORTRAN are example of compiled language
- It is a system software/ language translator that can translate the program written in high level language into machine language in line by line (single statement at a time) manner without looking the entire program
- The interpreter translates a line of program, executes it then translates the next line of program. The interpreter is a advantageous program since error are clearly indicate one by one.
- An interpreter is the representation of system being designed
- The software which take the line at a time (each line of instruction for translation) translates that line executes it and then takes up the next line, the complete object program is not available before execution so translated and immediately executed. This translation software is called interpreter.
It translates the program written in assembly language (low level language) into machine language (object code)
The system software used for translating program written in assembly language into machine language program is called assembler. So, assembly language program must be translated into machine code of 0s and 1s by separate program called assembler.
Difference between Compiler and Interpreter:
|1||Compiler takes entire program as input||Interpreter takes single instruction as input|
|2||intermediate object code is generated||no intermediate object code is generated|
|3||memory requirement is more (since object code is generated)||memory requirement is less|
|4||program need not be compiled every time||every time higher level program is converted to lower level program|
|5||error are displayed after entire program is checked||error are displayed after every instruction is interpreted|
|6||example : C, C++ compiler||Example: BASIC, PASCAL|
Multiple Choice Question Related to Language processor/ Translator:
1. Which memory translates one line at a time? (PSC Computer Operator Exam 2060)
- None of the above
2. What do you call the translator which takes high level language program as input and produce machine language code as output? (PSC Computer Operator Exam 2068)
3. A computer program that translates one program instruction at a time into machine language is called a/an (Nepal Khadya Sansthan 2071-06-26)
4. A computer program that translates one program instruction at a time into machine language is called a/an (PSC computer Operator exam 2071-02-11)
5. A computer program that converts program into machine language all at once. (PSC Computer Operator Exam 2074-5-23)
A computer program that converts assembly language to machine language is… (PSC Computer Operator Exam 2074-5-7)
6. Which language is understood by computer easily?
- High level
7. Which is the language that the computer can understand directly?
- High level language
- Assembly language
- Machine language
- System program
8. A compiler….
- Is a art of software
- Is a computer program
- Translate a high level language into machine language
9. Assemble language….
- Is the easiest language to write programs
- Uses alphabetic codes in place of binary numbers used in machine language
- Need not be translate into machine language
10. What is the name for the process that is used to convert a series of instruction, or program, written in a high level language into instruction (or a program) that can be run on a computer?
11. The system software that translates a source code into object code is …
- Language processor