Skip to content
Related Articles

Related Articles

GATE | GATE-CS-2005 | Question 66

Improve Article
Save Article
  • Last Updated : 19 Nov, 2018
Improve Article
Save Article

Match each of the high level language statements given on the left hand side with the most natural addressing mode from those listed on the right hand side.

 1 A[1] = B[J];         a Indirect addressing
 2 while [*A++];     b Indexed, addressing
 3 int temp = *x;    c Autoincrement 

(A) (1, c), (2, b), (3, a)
(B) (1, a), (2, c), (3, b)
(C) (1, b), (2, c), (3, a)
(D) (1, a), (2, b), (3, c)


Answer: (C)

Explanation:

List 1                           List 2
1) A[1] = B[J];      b) Indirect addressing 
Here indexing is used

2) while [*A++];     c) auto increment
The memory locations are automatically incremented

3) int temp = *x;    a) Indirect addressing
Here temp is assigned the value of int type stored
at the address contained in X

Hence (C) is correct solution.

See Addressing Modes for more information.

Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!