4 votes 4 votes #include <stdio.h> int main() { int arr [2][3][2]= {{{1,2},{2,3},{4,5}},{{1,2},{2,3},{4,5}}}; printf("%d %d", arr[1]- arr[0], arr[1][0]- arr[0][0]); return 0; } Programming in C programming programming-in-c madeeasy-testseries-2018 made-easy-test-series + – gari asked Jan 13, 2018 edited Mar 5, 2019 by ajaysoni1924 gari 570 views answer comment Share Follow See all 5 Comments See all 5 5 Comments reply Anu007 commented Jan 13, 2018 reply Follow Share answer will be 3, 6. When you are doing arr[1]- arr[0] means you skip 3 rows each of 2 elements When you are doing arr[1][0]- arr[0][0] means you skip 6 elements 3 votes 3 votes gari commented Jan 13, 2018 reply Follow Share @Anu sir i have a doubt.. suppose array starts at 100 . a[1]-a[0]=112-100=12 but as a[1] and a[0] points to the entire array i.e 12 bytes. so 12/12=1.(skipping an array) the difference between the 2 pointers should be according to the structure they are pointing to. similarly for a[1][0] and a[0][0] points to the structure row (4 bytes).. so it should be 12/4=3.(skipping 3 rows) what point am i missing. 0 votes 0 votes Anu007 commented Jan 13, 2018 reply Follow Share a[1]-a[0]=112-100=12 this is correct, but as a[1] and a[0] points to the entire array i.e 12 bytes. so 12/12=1.(skipping an array) why u done that 0 votes 0 votes Anu007 commented Jan 13, 2018 reply Follow Share when a[1] (means you are outside 2-d array) you skip 2-d array of 3 rows and each has size 4 byte . i.e. 12/4 = 3 when you do a[1] [0] (means you are inside 2d array) means now you skip elements i.e. 12/ 2= 6 0 votes 0 votes gari commented Jan 13, 2018 reply Follow Share thaku sir:) 0 votes 0 votes Please log in or register to add a comment.