fork download
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. #include <string.h>
  4.  
  5.  
  6. int main(int argc, const char * argv[])
  7. {
  8. int a;
  9. printf("%p\n",&a);
  10. unsigned int p = (unsigned int)&a;
  11. char s[2*sizeof(p)];
  12. for(int i = 2*sizeof(p)-1; i >= 0; --i)
  13. {
  14.  
  15. s[i] = "0123456789ABCDEF"[p & 0x0F];
  16. p >>= 4;
  17. }
  18. for(int i = 0; i < 2*sizeof(p); ++i)
  19. {
  20. putc(s[i],stdout);
  21. }
  22.  
  23. }
  24.  
Success #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
0xfffdcac4
FFFDCAC4