5 votes 5 votes Main() { int a[2][3][2]={{{2,4},{7,8},{3,4}},{{2,2},{2,3},{3,4}}}; Printf("%u",a); Printf("%u",*a); Printf("%u",**a); Printf("%u",***a); Printf("%u",a+1); Printf("%u",*a+1); Printf("%u",**a+1); Printf("%u",***a+1); } Pooja Palod asked Dec 30, 2015 Pooja Palod 878 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 6 votes 6 votes int a[2][3][2]; a can be taken as * to int[3][2]; sizeof(*a) = 3*2*4 = 24 (assuming sizeof(int) = 4) Printf("%u",a); //address of a Printf("%u",*a); //Address of a (a[0] = *(a+0)) Printf("%u",**a); ADDRESS of a (a[0][0] = *(*(a+0)+0)) Printf("%u",***a); 2 (a[0][0][0] = *(*(*a+0)+0)+0)) Printf("%u",a+1); address of a + sizeof(*a) = address of a +24 Printf("%u",*a+1); address of *a + sizeof(**a) = address of a + 8 Printf("%u",**a+1); address of **a + sizeof(***a) = address of a + 4 Printf("%u",***a+1); 2+1 = 3. Arjun answered Dec 30, 2015 selected Dec 30, 2015 by Pooja Palod Arjun comment Share Follow See all 3 Comments See all 3 3 Comments reply Himanshu1 commented Dec 31, 2015 reply Follow Share Printf("%u",***a); Here value printed is 2. it is a integer , so, it should be %d , why it is taken as %u ? Is it valid ? 0 votes 0 votes Hira Thakur commented Jan 15, 2016 reply Follow Share can you show how to write it in arry form so it wil be easy to understand.. 0 votes 0 votes Sourabh Kumar commented Apr 29, 2016 reply Follow Share 5th one is wrong arjun please check it skip only 1 -2d array So addreßs of a+12 print 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes 1. address of outer a[0] 2. address of a[0][0] 3. address of a[0][0][0] 4. value of a[0][0][0] 5. address of outer a[1] 6. address of a[1][0] 7. address of a[1][0][0] 8. value of a[1][0][0] Please do correct if wrong. UK answered Dec 30, 2015 UK comment Share Follow See all 0 reply Please log in or register to add a comment.