arrow
arrow
arrow
Match List-I with List-II. List – I List – II A. Macros I. Convert
Question

Match List-I with List-II.
List – I
List – II
A.
Macros
I.
Converts high level code to object (Machine) code
B.
Assembler
II.
Used for code Expansion
C.
Loader
III.
Used to translate assembly language code to object code
D.
Compiler
IV.
Used to allocate memory and relocate program in memory
Choose the correct answer from the options given below:

A.

A-IV, B-III, C-I, D-II

B.

A-II, B-III, C-I, D-IV

C.

A-II, B-III, C-IV, D-I

D.

A-IV, B-I, C-III, D-II

Correct option is C


A macro is a named sequence of instructions or statements that is expanded into its corresponding code whenever the macro is invoked, so it is primarily used for code expansion.
An assembler translates assembly language instructions into machine/object code that can be processed further.
A loader is responsible for placing the executable program into main memory and performing required relocation and memory allocation activities. A compiler translates a high-level programming language into object or machine-level code, often through several intermediate stages.
Information Booster
1. Macros → Code Expansion
· A macro represents a predefined sequence of statements that can be invoked using a macro name.
· During macro expansion, the macro call is replaced by the corresponding sequence of statements.
· It reduces repetitive coding and improves programmer convenience.
· Macro processors may operate as part of an assembler or as a separate preprocessing stage.
2. Assembler → Assembly to Object Code
· An assembler converts assembly language instructions into machine/object code.
· It resolves symbolic names, labels, and instruction mnemonics.
· A two-pass assembler commonly uses one pass to construct the symbol table and another to generate the object code.
· Examples of assembly instructions include MOV, ADD, SUB, and JMP, depending on the instruction set.
3. Loader → Memory Allocation and Relocation
· A loader loads the executable program from secondary storage into main memory.
· It determines appropriate memory locations for the program and may perform relocation when required.
· Relocation adjusts address-dependent information when a program is loaded at an address different from the one assumed during translation.
· Loading is performed after the program has been translated and linked.
4. Compiler → High-Level Language Translation
· A compiler translates a high-level language into a lower-level representation, commonly producing object code through the compilation process.
· Major compiler phases include lexical analysis, syntax analysis, semantic analysis, intermediate code generation, optimization, and target-code generation.
· Unlike an assembler, a compiler works with higher-level programming constructs such as variables, expressions, functions, and control structures.

Free Tests

Free
Must Attempt

Basics of Education: Pedagogy, Andragogy, and Hutagogy

languageIcon English
  • pdpQsnIcon10 Questions
  • pdpsheetsIcon20 Marks
  • timerIcon12 Mins
languageIcon English
Free
Must Attempt

UGC NET Paper 1 Mock Test 1

languageIcon English
  • pdpQsnIcon50 Questions
  • pdpsheetsIcon100 Marks
  • timerIcon60 Mins
languageIcon English
Free
Must Attempt

Basics of Education: Pedagogy, Andragogy, and Hutagogy

languageIcon English
  • pdpQsnIcon10 Questions
  • pdpsheetsIcon20 Marks
  • timerIcon12 Mins
languageIcon English

Similar Questions

test-prime-package

Access ‘UGC NET Computer Science’ Mock Tests with

  • 60000+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
527k+ students have already unlocked exclusive benefits with Test Prime!

Similar Questions

Our Plans
Monthsup-arrow