fork download
  1. #include <stdio.h>
  2.  
  3. int main(int argc, int *argv[]) {
  4. // your code goes here
  5. char str[100], d[4][3];
  6. printf("\nThe address is: %p", argv[0]);
  7. sprintf(str, "%p", argv[0]);
  8. printf("\nThe string is: %s", str);
  9. sscanf(str+6, "%2s%2s%2s%2s", d[0], d[1], d[2], d[3]);
  10. printf("\n\n%s / %s / %s / %s\n", d[0], d[1], d[2], d[3]);
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
The address is: 0x7ffd54ddff36
The string is: 0x7ffd54ddff36

54 / dd / ff / 36