int main(int argc, char **argv){
printf("argv: %s\n",argv); // does not work and prints random stuff
printf("*argv: %s\n",*argv); // works and prints ".a.out"
}
I test with:
./a.out nop
My confusion is this:
"argv" variable in the second line has the address of the first char of "./a.out".
"*argv" variable in third line is the first char of "./a.out".
So why printf("argv: %s\n",argv); to only print "./a.out" does not work?
I know that it's wrong, but I don't know why.
