Skip to content
Related Articles

Related Articles

Improve Article

GATE | GATE-CS-2005 | Question 66

  • Last Updated : 19 Nov, 2018

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)


Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

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
Recommended Articles
Page :