1 votes 1 votes main(){ static int n[3][3] = {2,4,3,6,8,5,3,5,1}; Int i,j; for(i=2;i>=0;i--){ for (j=2;j>=0;j--){ printf(“%d ”,*(*(n+i)+j)); } } What will be the output of the program? mohitbawankar asked Jan 2, 2018 mohitbawankar 271 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Anu007 commented Jan 2, 2018 reply Follow Share input in reverse order 1 5 3 5 8 6 3 4 2 #include <stdio.h> int main(){ static int n[3][3]={2,4,3,6,8,5,3,5,1}; int i,j; for(i=2;i>=0;i--){ for (j=2;j>=0;j--){ printf( "%d ",*(*(n+i)+j)); } } return 0; } run this here https://www.tutorialspoint.com/compile_c_online.php 0 votes 0 votes mohitbawankar commented Jan 2, 2018 reply Follow Share problem is gate not provide any compiler :) 0 votes 0 votes Anu007 commented Jan 2, 2018 reply Follow Share ?????? 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes 2 4 3 6 8 5 3 5 1 1000 1002 1004 1006 1008 1010 1012 1014 1016 *(*(n+i)+j) = here *(n+i) means skipping 'i' rows which contains 3 elements of each size "c" bytes {here, i assumed c=2Bytes} and selecting row which is done by "*". after that, 'j' elements are skipping of size "c" bytes. first iteration: i=2, j=2 *(*(1000+2)+2) = *(*(1000+2*3*2)+2*2) = *(*(1012)+4) =*(1016) = 1 similarly for i=2,j=1 *(*(1000+2)+1) = *(*(1000+2*3*2)+1*2) = *(*(1012)+2) =*(1014) = 5 final o/p: 1 5 3 5 8 6 3 4 2 Akash Mittal answered Jan 2, 2018 Akash Mittal comment Share Follow See all 0 reply Please log in or register to add a comment.