2 2 votes Programming in C programming-in-c + – vaishali jhalani 1.4k views answer comment Share Follow Print See 1 comment 1 1 comment reply pC commented Nov 9, 2016 reply Follow flag 3,6,1 0 0 replyShare Please log in or register to add a comment.
Best answer 4 4 votes I think it will help you to under stand . sorry if i done some calculation mistake. Prashant. answered Nov 9, 2016 • selected Nov 9, 2016 by pC Prashant. comment Share Follow See all 8 Comments 8 8 Comments reply vaishali jhalani commented Nov 9, 2016 reply Follow flag yes.. Here what is the significance of a[1] and a[1][0]? 0 0 replyShare Prabhanjan_1 commented Nov 9, 2016 reply Follow flag May this helps you for understanding multi dimensional arrays https://gateoverflow.in/66452/modified-gate-question-self-doubt 0 0 replyShare Prashant. commented Nov 9, 2016 reply Follow flag wait i update clear picture . 0 0 replyShare Prashant. commented Nov 9, 2016 reply Follow flag check 0 0 replyShare vaishali jhalani commented Nov 9, 2016 i edited by vaishali jhalani Nov 9, 2016 reply Follow flag I am not inderstanding few points: 1. Why address of a[0] and a[1][0] is same? 2. As a[0] is pointing to first 2darray , what a[1][0] pointing to? 3. why we divided by 4 in a[1]-a[0]? 0 0 replyShare Prashant. commented Nov 9, 2016 reply Follow flag 1.a[1] and a[1][0] address same but meaning is different a[1] talk about 2d array of size [3][2] a[1][0] talk about 1d array [2] 2. As a[0] is pointing to first 2darray , but a[0][0] pointing to first 1 d array 3. why we divided by 4 in a[1]-a[0] beacuse we skip row which is define [3] each contain 2 elements so size 2*2= 4. 1 1 replyShare mcjoshi commented Nov 9, 2016 i edited by mcjoshi Nov 9, 2016 reply Follow flag @Anirudh, a[0] points to a 2-D array of [3][2], so scaling factor is sizeof 1-D array in first part.,i.e., $4$ and a[1][0] points to 1-D array $2$ element. so, scaling factor $=$ sizeof an element in $1-D$ array i.e., $2$B 1 1 replyShare Prashant. commented Nov 10, 2016 reply Follow flag Yes .. 1 1 replyShare Please log in or register to add a comment.