K
Kutty Banerjee
hi ,
i ve
int (*Data)[4];
int A[4]={1,2,3,4};
Data=&A;
//Question here, how d i dynamically allocate space for Data using calloc?
printf("%d\n",*Data[0]) ; //gives 1
//But printf("%d\n",*Data[1]) produces weird value.
Can somebody please tell me what is the correct way to dynamically allocate
space for int (*Data)[4] as also to access the in dividual elements of the
array that it points to.
thanks
kutty
i ve
int (*Data)[4];
int A[4]={1,2,3,4};
Data=&A;
//Question here, how d i dynamically allocate space for Data using calloc?
printf("%d\n",*Data[0]) ; //gives 1
//But printf("%d\n",*Data[1]) produces weird value.
Can somebody please tell me what is the correct way to dynamically allocate
space for int (*Data)[4] as also to access the in dividual elements of the
array that it points to.
thanks
kutty