From what I understood, I am passing the address of the variable a
to the function int ffx1
.
After that, what exactly does this line p = (int[2]){*p};
mean?
int ffx1(int * p)
{
p = (int[2]){*p};
return(p[1]);
}
int main()
{
int a = 1;
a = ffx1(&a);
printf("%d", a);
return 0;
}
(int[2]){*p}
is compound literal.p = (int[2]){*p};
such asint array[2] = { *p, 0 }; p = array;
– Deipnosophist