I am trying this:
int test(int **a){
return **a;
}
int main(){
int p[2]={1,2};
int *a=&p[0];
int **d=&a[0];
//for (int i=0;i<2;i++)
// printf("\na=%d\n",a[i]); //ok this works
for (int i=0;i<2;i++)
printf("\n%d \n",test(&a[i]));
return 0;
}
I want this printf("\n%d \n",test(&a[i]));
to work.
I want to use a pointer.
Thanks