fork(2) download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void)
  5. {
  6. void* p = malloc(64);
  7. if(p)
  8. {
  9. int* one = (int*)((char*)p);
  10. int* two = (int*)((char*)p + 7);
  11.  
  12. printf("%x %x %d %d\n", one, two, sizeof(int), two - one);
  13.  
  14. free(p);
  15. }
  16.  
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 2244KB
stdin
Standard input is empty
stdout
8a94008 8a9400f 4 1