Advertisement
Guest User

Untitled

a guest
Mar 1st, 2018
112
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. # [pjb@despina :0.0 c]$ make arg0
  3. cc arg0.c -o arg0
  4. # [pjb@despina :0.0 c]$ ./arg0
  5. argv[0]=./arg0
  6. # [pjb@despina :0.0 c]$ ( PATH=$(pwd) ; arg0 )
  7. argv[0]=arg0
  8. # [pjb@despina :0.0 c]$ $(pwd)/arg0
  9. argv[0]=/Users/pjb/src/c/arg0
  10. # [pjb@despina :0.0 c]$ cat arg0.c
  11. #include <stdio.h>
  12. int main(int argc,char* argv[]){
  13. printf("argv[0]=%s\n",argv[0]);
  14. return 0;
  15. }
  16. # [pjb@despina :0.0 c]$
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement