Warning: count(): Parameter must be an array or an object that implements Countable in /home/customer/www/thegatebook.in/public_html/qa/qa-include/qa-theme-base.php on line 177

# CO-Grand Test -Q5

Warning: count(): Parameter must be an array or an object that implements Countable in /home/customer/www/thegatebook.in/public_html/qa/qa-include/qa-theme-base.php on line 177
+1 vote

Suppose that V is a vector with indices from a to b and that each element of V occupies two words. If the elements of V are stored in consecutive words of memory and $\dpi{100} \alpha V[a]$ is the address of word 1 of $\dpi{100} V[a]$ , then the address of word 1 of $\dpi{100} V[i]$, where  $\dpi{100} a\leq i \leq b,$ is

(A). $\dpi{100} ( \alpha V[A] - a ) + i$

(B). $\dpi{100} 2 ( \alpha V[A] - a ) + 2i$

(C). $\dpi{100} ( \alpha V[A] - 2a ) + 2i$

(D). $\dpi{100} ( \alpha V[A] - 2 a ) + i$

asked Jun 14, 2020
edited Jun 25, 2020

Every element of V occupies 2 words. Base/Starting address is  $\dpi{100} \alpha V[a]$ .
Address of V[i] = $\alpha V[a] + (i-a)*2$