/triple.c Secret
Last active
August 29, 2015 14:22
Revisions
-
sanofc revised this gist
Jun 6, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ int main(void){ p3=p2; for(int i=0;i<2;i++){ for(int j=0; j<2; j++){ printf("p[%d][%d]=%p %d\n",i,j,p3,*(**p3+i*2+j)); } } } -
sanofc created this gist
Jun 6, 2015 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ #include <stdio.h> int main(void){ int *p1[2][2],**p2[2],***p3; int i[4]={100,200,300,400}; p1[0][0]=&i[0]; p1[0][1]=&i[1]; p1[1][0]=&i[2]; p1[1][1]=&i[3]; p2[0]=p1[0]; p2[1]=p1[1]; p3=p2; for(int i=0;i<2;i++){ for(int j=0; j<2; j++){ printf("p2=%p %d\n",p3,*(**p3+i*2+j)); } } }