Language Processing System questions often look like easy terminology, but they test the order of translation and the exact responsibility of each system program. A compiler, assembler, macro processor, linker, loader, interpreter and debugger receive different inputs and produce or inspect different outputs. Attempt each question before reading its explanation. Pay particular attention to module resolution, conditional macro expansion, recursive macro calls and two-pass assembly, where one misplaced stage changes the answer. These distinctions also connect to the wider GATE CS exam syllabus.
Language Processing System basics: compiler, assembler and interpreter
A compiler translates high-level source code, an assembler translates assembly language, and an interpreter translates and executes statements during the run. Keep the input, output and timing of each tool separate.
Q1. DSSSB 2021
_________ is a system software package that converts a high level language program to machine language.
(a) Compiler
(b) Emulator
(c) Editor
(d) Debugger
Answer: (a) Compiler. A compiler performs the required language translation from a high-level program towards machine-executable form. An emulator imitates another computer or environment, an editor changes the source text, and a debugger helps inspect execution. None of those three performs the stated translation.
Q2. DSSSB 2021
_____ converts a source code to object code.
(a) Compiler
(b) Linker
(c) Editor
(d) Loader
Answer: (a) Compiler. The pipeline direction is source code into the compiler, then object code out. A linker combines object modules and resolves references, while a loader later places the executable in memory. An editor only helps create or modify source code.
Q3. TPSC 2024
_______ is the computer program that would convert an assembly language to the machine.
(a) Interpreter
(b) Compiler
(c) Comparator
(d) Assembler
Answer: (d) Assembler. An assembler converts assembly mnemonics and symbolic operands into machine instructions. An interpreter handles program execution statement by statement, a compiler translates a high-level language, and a comparator compares values or data rather than translating assembly code.
Q4. HTET 2024
Component(s) of interpreter is/are :
(a) Symbol table
(b) Data store
(c) Data manipulation
(d) All options are right
Answer: (d) All options are right. The symbol table binds program names to their meanings, and the data store retains values and runtime state. The interpreter's evaluation mechanism manipulates that data while executing statements. All three roles belong to the coherent working model described by the question.
Linker MCQs: resolving modules and references
Separately compiled modules can contain unresolved symbolic references. The linker matches each reference to a definition and produces a load module. The loader acts later, when that output is prepared in memory for execution.
Q5. GATE 2004
Consider a program P that consists of two source modules M1 and M2 contained in two different files. If M1 contains a reference to a function defined in M2, the reference will be resolved at
(a) Edit-time
(b) Compile-time
(c) Link-time
(d) Load-time
Answer: (c) Link-time. See the exact solved question. Compile M1 and M2 independently to produce two object modules. The call in M1 remains unresolved because its definition is not in that module. At link-time, the linker finds the definition in M2 and connects the call to it. Dynamic libraries can defer some resolution until load-time, but ordinary cross-file static resolution in this question happens at link-time.
Q6. UGC NET 2016
Which of the following statement(s) regarding a linker software is/are true?
I A function of a linker is to combine several object modules into a single load module.
II A function of a linker is to replace absolute references in an object module by symbolic references to locations in other modules.
(a) Only I
(b) Only II
(c) Both I and II
(d) Neither I nor II
Answer: (a) Only I. Statement I correctly describes the combination of object modules into one load module. Statement II reverses the operation: object modules can carry symbolic references, and the linker resolves them into concrete locations. It does not replace already absolute references with symbolic ones.
Macro processor MCQs: expansion time and recursive calls
Macro expansion is a source-transformation activity that happens before the expanded program executes. The recurring trap is to treat a condition evaluated by the macro processor as if it were evaluated later by the running program.
Q7. GATE 1997
The conditional expansion facility of macro processors is provided to
(a) test a condition during the execution of the expanded program
(b) expand certain model statements depending on the value of a condition during execution of the expanded program
(c) implement recursion
(d) expand certain model statements depending on the value of a condition during macro expansion
Answer: (d). See the exact solved question. The condition is checked during macro expansion, and its value decides which model statements are expanded. Options (a) and (b) move the check to execution time, which is too late. Recursion may be supported separately, but it is not the purpose of conditional expansion.
Q8. GATE 1996
Which of the following macros can put a macro assembler into an infinite loop? (i) M1(X): if X = 0, call M1(X + 1); if X != 0, emit .WORD X. (ii) M2(X): if X = 0, call M2(X); if X != 0, emit .WORD X + 1.
(a) (ii) only
(b) (i) only
(c) Both (i) and (ii)
(d) None of the above
Answer: (a) (ii) only. See the exact solved question. Trace M1 from zero: M1(0) -> M1(1) -> emit .WORD 1. Its argument makes progress, so the expansion terminates. Trace M2 from zero: M2(0) -> M2(0) -> M2(0) -> .... Its argument never changes, so the macro assembler loops during expansion. Progress in the recursive argument is the reusable test.
Q9. UGC NET 2015
The translator which performs macro calls expansion is called :
(a) Macro processor
(b) Micro pre-processor
(c) Macro pre-processor
(d) Dynamic linker
Answer: (c) Macro pre-processor. It replaces macro invocations with expanded source before normal compilation proceeds. The broader term "macro processor" is also used in textbooks, but this question expects "macro pre-processor". A dynamic linker resolves library references, and a micro pre-processor is not the required tool.
Two-pass assembler MCQ: map each activity to its pass
In a two-pass assembler, Pass 1 assigns addresses and builds tables. Pass 2 uses those addresses and tables to generate final object code and produce the listing.
Q10. GATE 1996
The pass number for each of the following activities
Object code generation
Literals added to literal table
Listing printed
Address resolution of local symbols
That occur in a two pass assembler respectively are
(a) 1, 2, 1, 2
(b) 2, 1, 2, 1
(c) 2, 1, 1, 2
(d) 1, 2, 2, 2
Answer: (b) 2, 1, 2, 1. See the exact solved question. Object code generation is activity 1 and belongs to Pass 2. Adding literals to the literal table is activity 2 and belongs to Pass 1. Printing the listing is activity 3 and belongs to Pass 2. Resolving addresses of local symbols is activity 4 and belongs to Pass 1. Therefore the ordered tuple is 2, 1, 2, 1: Pass 1 builds the information that Pass 2 uses for code emission.
Debugger and compiler-versus-interpreter MCQs
Translation tools produce another form of a program. A diagnostic tool such as a debugger instead controls and observes execution. It neither translates source nor links object modules.
Q11. NIMCET 2025
Debugger is a program that:
(a) does not allow step by step execution of a segment of program
(b) links object code to produce an executable
(c) allows to set breakpoints, execute a segment of program and display contents of Register
(d) compiles source code to object code
Answer: (c). A debugger can stop at a breakpoint, step through a selected part of the program, and show register contents or other runtime state. Option (a) denies a core debugging ability. Options (b) and (d) describe a linker and compiler respectively.
Q12. ISRO 2008; TPSC 2025
Relative to the program translated by a compiler, the same program when interpreted runs
(a) Faster
(b) Slower
(c) At the same speed
(d) May be faster or slower
Answer: (b) Slower. In the expected model, compiled machine instructions are ready before execution begins. Interpretation adds repeated runtime translation and dispatch work, so the interpreted version normally runs slower relative to the compiled version. This is the conceptual comparison the question tests, not a universal benchmark for every implementation.
How exams test Language Processing Systems
The main patterns are:
Q1 to Q4 test direct identification of a tool from its role.
Q5 and Q6 test module resolution and a reversed direction of operation.
Q7 to Q9 test expansion-time reasoning and recursive macro traces.
Q10 tests whether each assembler activity belongs to Pass 1 or Pass 2.
Q11 and Q12 test diagnostic behaviour and normal interpretation overhead.
Use the score as a study diagnostic. If you get 10 to 12 correct, move to the wider Compiler Design MCQs set. At 7 to 9, revise the translation pipeline and repeat the M1, M2 and two-pass traces. At 0 to 6, rebuild the sequence source -> preprocessor -> compiler -> assembler -> linker -> loader, then retry this set. When you are ready for the next compiler stage, continue with Lexical Analysis MCQs.
The short version and next step
A compiler translates source, an assembler handles assembly, macro pre-processing expands source, a linker resolves modules, and a loader prepares the program for execution. An interpreter translates while the program runs, while a debugger observes and controls that run.
After one day, retry only the questions you missed. From memory, reproduce the non-progress trace M2(0) -> M2(0) -> M2(0) -> ... and the assembler pass sequence 2, 1, 2, 1. If both come back cleanly, the two most reasoning-heavy traps in this set are under control.
For a structured Compiler Design learning path with connected practice, continue with GATE Guidance by Sanchit Sir.




