fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <memory.h>
  4.  
  5. int main() {
  6. char* a = malloc(32);
  7. char* b = malloc(32);
  8. char* s = strdup("hello");
  9. free(s);
  10. char* c = malloc(32);
  11.  
  12. printf("a = %p, b = %p (a + 32 = %p), c = %p (b + 32 = %p)\n", a, b, a+32, c, b + 32);
  13.  
  14. // your code goes here
  15. return 0;
  16. }
Success #stdin #stdout 0s 2424KB
stdin
Standard input is empty
stdout
a = 0x8363008, b = 0x8363030 (a + 32 = 0x8363028), c = 0x8363068 (b + 32 = 0x8363050)