To access y's elements do:
char c = p[some index between 0 and 1].y[some index between 0 and 9].c
To access elements referred to by x do:
size_t i = some index between 0 and 1;
p[i].x = malloc(somenumber_of_elements * sizeof *p[i].x);
if (NULL == p[i].x)
{
abort(); /* Failure to allocate memory. */
}
char c = p[i].x[some index less then somenumber_of_elements].c;
Referring kabhis comment
p[0].x->c is it not correct ?
Assuming the allocation above with somenumber_of_elements greater 0, then:
char c = p[i].x[0].c;
is equivalent to
char c = p[i].x->c;
and for somenumber_of_elements greater 1
char c = p[i].x[1].c;
is equivalent to
char c = (p[i].x + 1)->c;
and so on ...
xis a pointer toacc1whileyis an array of 10acc1, not an array of pointers. Maybe it is what you want, maybe not. These cases are better written in separated lines:acc1 *x; acc1 y[10];.