Difine translator explain the different type of translatos used in c programing
Answers
Answer:
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.
It also detects and reports the error during translation.
Roles of translator are:
• Translating the high-level language program input into an equivalent machine language program.
• Providing diagnostic messages wherever the programmer violates specification of the high-level language program.
The different types of translator are as follows:
Compiler
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.
Interpreter
Interpreter is a translator which is used to convert programs in high-level language to low-level language. Interpreter translates line by line and reports the error once it encountered during the translation process.
Assembler
Assembler is a translator which is used to translate the assembly language code into machine language code.
#Secretgirl ✌