Skip to content

Instantly share code, notes, and snippets.

@sanofc

sanofc/triple.c Secret

Last active August 29, 2015 14:22
#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("p[%d][%d]=%p %d\n",i,j,p3,*(**p3+i*2+j));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment