Guest User

Untitled

a guest
Feb 8th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6.   char * pch;
  7.        
  8.   pch = strtok (argv[0],"\\");
  9.   int sizeAr = sizeof(pch)/sizeof(char);
  10.  
  11.   char* nameApp;
  12.   while (pch != NULL)
  13.   {
  14.     nameApp = pch;
  15.     pch = strtok (NULL, "\\");
  16.   }
  17.  
  18.   printf("%s",nameApp);
  19.   return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment