0 votes 0 votes Caption Programming in C algorithms array + – Vaishnavi01 asked Sep 10, 2018 Vaishnavi01 834 views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Shaik Masthan commented Sep 10, 2018 reply Follow Share i am getting 1) 83 ===>option D 2) 181 ===> option D is these are right? 0 votes 0 votes raahul commented Sep 10, 2018 reply Follow Share Yes,I am also getting the same answers. 0 votes 0 votes Mizuki commented Sep 10, 2018 reply Follow Share @Shaik Masthan @raahul How? 0 votes 0 votes hitendra singh commented Sep 20, 2018 reply Follow Share what is the size of the word ? 0 votes 0 votes hitendra singh commented Sep 20, 2018 reply Follow Share ANS(1) array is given as a=$\begin{bmatrix} 1& 2 & 3 & 4 &5 & 6 & 7 &8 &9 \\ 10& 11& 12 & ..& ..& &.. & &18 \\ 19 &20 &21 & .. &. & ..& &. . &27 \\ .. &.. & & .. & & ...&... &.. & ..\\ & & & & & & & & \\ & & & & & & & & \\ & & & & & & & & \\ & & & & & & & & \\ ..& ... ..&. .. ..& &.. & .. .& ..& .. & \\ 82 & 83 & 84 &85 &86 &87 &88 &89 &90 \end{bmatrix}$ now the address 67 first find 67-29=38 word size =2 now assume you have to find out address of element 10 , it will be 29 +2=31 as array is stored in column major order similarly , for address 67 we can find number of elements between these addresses i.e. 67-29=38 #elements=38/2=19 it will be a[10][2] since a[1][2]=2 a[2][2]=11 similarly (like A.P.) a[10][2] =2+(10-1)9=83 ANS(2) I think option A is correct using column major order 29+[(7-1)*10+6]*2=161 1 votes 1 votes Raj_81 commented Sep 29, 2019 reply Follow Share @hitendra singh I think you put the wrong formula for the column-major order. ans will be 181. 0 votes 0 votes Please log in or register to add a comment.