Possible Duplicate:
Difference between passing array and array pointer into function in C
I have been wondering this for a while, is there any difference between these two?
void f1(char *c);
void f2(char c[]);
A common example is this:
int main(int argc, char **argv);
int main(int argc, char *argv[]);
Are there any reasons to prefer one to the other, apart from artistic ones?
There is no difference.
From the horse mouth:
On the reasons to prefer one form over the other, it depends on the people. Here is what H&S says (on switching to
T *arrayfromT arr[]):