see i have seen some code like
int (*b)[10];
which means
declare b as pointer to array 10 of int
so i want to ask you what is the purpose of doing this ?
why don't we write instead of that just
int array[10];
and use as passing address of array.
both are same or any difference ?
Edit : Dont be confuse with
int *b[10]; // this one declare b as array 10 of pointer to int
and
int (*b)[10]; // this one declare b as pointer to array 10 of int
one more Edit
see int (*b)[10];
1>will allocate memory for 10 elements of int and the address of that memory will be assigned to b ?
or
2>there will be no memory allocated for array. here it says b is capable of holding address of and int array of 10 element ?
which option is right ? if any one is right then why one should use this complex syntax rather then using different method?