hi,
i have an array like this:
char **array which i want to store like this
cat
dog
rat
an array of pointers...
array=calloc(10,sizeof(cha
r*));
then, i have a loop....
for(i=0;i<5;i++)
{
array[i]=calloc(15,sizeof(
char*));
}
i have simplified the code...the strange thing is that , i need to put a star in both the callocs..if not , i get bus error...
i know i need to put a star here : array=calloc(10,sizeof(cha
r*)); to say an array of pointers
but why in the loop as well...
could anyone pls explain ...thanks
Start Free Trial