Last active
December 19, 2021 21:35
-
-
Save s3va/8735d4557ac63850f46a4fbf6afb21ef to your computer and use it in GitHub Desktop.
confusion with asterisks and ampersands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(int argc,char **argv){ | |
printf("%d\n",argc); | |
puts(*argv); | |
printf("%p\n",*argv); | |
if(argc>1){ | |
puts(*(argv+1)); | |
printf("*** %p\n",*(argv+1)); | |
printf("[[[ %p\n",argv[1]); | |
} | |
for(char** s=argv ; s<argv+argc; *s++){ | |
printf("ppppp %p\nssssss %s\n",*s,*s); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment