fork(3) download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void) {
  5. char* p = calloc(1, 1);
  6. printf("Memory calloced at %p: %d\n", p, *p);
  7. *p = 42;
  8. free(p);
  9.  
  10. p = calloc(1, 1);
  11. printf("Memory calloced at %p: %d\n", p, *p);
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 2424KB
stdin
Standard input is empty
stdout
Memory calloced at 0x847d008: 0
Memory calloced at 0x847d008: 0