0 votes 0 votes A one dimensional array A has indices 1....75.Each element is a string and takes up three memory words. The array is stored starting at location 1120 decimal. The starting address of A[49] is A.1167B.1164C.1264D.1169I think the location of A[49] will be 1264 because location of A[49] is 1264= (1120+(48*3))as it takes three memory words.is this correct answer?Does each memory word represents a single character? or am i doing something wrong? Programming in C array programming + – GATE_2016 asked Apr 22, 2015 GATE_2016 4.0k views answer comment Share Follow See 1 comment See all 1 1 comment reply munna kumar commented Jan 6, 2016 reply Follow Share yes correct 0 votes 0 votes Please log in or register to add a comment.
Best answer 5 votes 5 votes yes you are right ans is 1264 supraja answered Apr 22, 2015 selected Dec 2, 2015 by Pooja Palod supraja comment Share Follow See all 2 Comments See all 2 2 Comments reply Arjun commented Apr 22, 2015 reply Follow Share but is it the same in C language? Because we have only pointers and no string. 0 votes 0 votes pawankumartiwari commented Jun 10, 2015 reply Follow Share 1264 is correct 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes the answer should be 1120 + (49 * 3) = 1167 because there are 49 elements in array before A[49].for understanding , for A[0] = 1120 +(0*3) = starting address for a[1]= 1120 + (1*3) and so on.... lokesh kumar answered Apr 29, 2015 lokesh kumar comment Share Follow See all 2 Comments See all 2 2 Comments reply Mari Ganesh Kumar commented Jul 4, 2015 reply Follow Share In the given question index starts from 1, so its 1264 only 0 votes 0 votes lokesh kumar commented Jul 6, 2015 reply Follow Share my bad ,, thanks 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Ans: C One element takes three memory words so memory location 1120 , 1121 , 1123 stores first element. A[49] will be stored at location 1264. (1120+(48*3))=1264 munna kumar answered Jan 6, 2016 munna kumar comment Share Follow See all 0 reply Please log in or register to add a comment.