void subfunc(char **dat)
{
int i, j;
dat = (char **)malloc(3 * sizeof(char *));
for (i = 0; i < 3; ++ i)
{
dat = (char *)malloc(16);
for (j = 0; j < 15; ++ j)
dat[j] = 'a';
dat[j] = '\0';
}
}
int main(void)
{
char **dat = NULL;
int i;
subfunc(dat);
for (i = 0; i < 3; ++ i)
puts(dat);
for (i = 0; i < 3; ++ i)
free(dat);
free(dat);
return 0;
}