Guest User

Untitled

a guest
Jul 19th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. typedef int bartyp[2][2];
  4.  
  5. typedef struct foobar {
  6. bartyp *bar;
  7. } foo;
  8.  
  9. int main(void){
  10. bartyp bar;
  11. foo foostruct;
  12. int i;
  13. int j;
  14. for(i=0; i<2; i++)
  15. for(j=0; j<2; j++)
  16. bar[i][j]=1;
  17. foostruct.bar = &bar;
  18. printf("%i\n", *foostruct.bar[1][1]);
  19. return 0;
  20. }
Add Comment
Please, Sign In to add comment