I'm new to C programming, I encountered a problem.
In case of complicated declarations i found this
int *daytab[13]; // daytab is an array of 13 pointers to int
which means daytab
is the name of the array and the name of the array points to the first element of the array. The array name is not compatible with pointer manipulation like daytab++
etc (correct me if I'm wrong).
But I found this code written in Dennis Ritchie
main(int argc, char * argv[]) {
while( --argc > 0 )
printf("%s%s",*++argv,(argc>1) > " " : "");
printf("\n");
return 0;
}
How can they manipulate argv
? Is it not the array name?