Discussion
Match each addressing mode in List I with a data element or an element of a data structure (in a high-level language) in List II:
| List I | List II |
|---|---|
| P. Immediate | 1. Element of an array |
| Q. Indirect | 2. Pointer |
| R. Base with index | 3. Element of a record |
| S. Base with offset/displacement | 4. Constant |
Answer: B
The correct matching is P-4, Q-2, R-1, S-3.
- Immediate: the operand is in the instruction itself, which is how a constant is supplied (4).
- Indirect: the instruction names a location that holds the address of the operand, which is how a pointer is followed (2).
- Base with index: a base register holds the start of an array and an index register selects the element, so the address varies at run time (1).
- Base with offset/displacement: a base register holds the start of a record and a fixed offset in the instruction selects the field (3).
Options that pair indirect addressing with a record element, or immediate addressing with an array, mix up the fixed offset of a record field with the variable index of an array element.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development