📜  门| GATE-CS-2005 |第66章

📅  最后修改于: 2021-06-30 00:05:13             🧑  作者: Mango

将左侧给出的每个高级语言语句与右侧列出的最自然的寻址模式进行匹配。

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)答案: (C)
解释:

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

因此,(C)是正确的解决方案。

有关更多信息,请参见寻址模式。
这个问题的测验