Match each addressing mode in with a data element or an element of a data structure (in a high-level language) in :
View worked solution
Answer: B
We can match the addressing modes in List I with their corresponding high-level language constructs in List II as follows:
- P. Immediate → 4. Constant: The operand value is specified directly within the instruction, which represents constant values (e.g.,
x = 5). - Q. Indirect → 2. Pointer: The instruction references a location containing the address of the operand, which corresponds to pointer dereferencing (e.g.,
*ptr). - R. Base with index → 1. Element of an array: The effective address is the sum of a base register (array start address) and an index register (element index), used for accessing array elements (e.g.,
A[i]). - S. Base with offset/displacement → 3. Element of a record: The effective address is the sum of a base register (record start address) and a constant offset (field offset), used to access fields of a structure/record (e.g.,
student.age).
Thus, the correct matching is P-4, Q-2, R-1, S-3.
Free practice · Your answers on this page are not saved.
