in Programming
547 views
3 votes
3 votes
#include<stdio.h>

int main() {
   int arr[2][3][2]={{{2,4},{7,8},{3,4},},{{2,2},{2,3},{3,4},}};
   print("\n%d",**(*arr+1)+2+7);
   return 0;
}
plz explain this program, internally how it's stored in memory & how to execute,(forget if any syntactic error in the program)
in Programming
547 views

2 Comments

is it 16?
0
0

  hs_yadav plz explain it.

0
0

1 Answer

7 votes
7 votes

ans is 16

Yes explanation is -

Always try to manipulate such Questions using diagrams so it will never go wrong.

(Consider all addresses are temporary)

*arr = 200

*arr+1 = 200+(1*size of array of 2 elemnts) = 208

so it will then point to block 208

*(*arr+1) = 308

*(*(*arr+1)) = 7

7+7+2 =16

:)