I was asked in an interview, there is a pointer to an array of 10 integers, something like this below.
int (*p)[10];
How do you distribute it dynamically?
This is what I did
p=(int *)malloc(10*sizeof(int));
But it doesnβt look right because I am not doing the right type.
So, I would like to know what type of * p ??
Like int * p, p is of type int.
source share