fork(1) download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. int main() {
  6. int i;
  7. char *p=(char*)malloc(100);
  8. for (i=0; i<100; i++)
  9. p[i]=0;
  10. strcpy (p+10, "Christophe");
  11. free(p);
  12. char *q= (char*)malloc(100);
  13. printf ("%ld==%ld ? %c%c%c\n", (long) p, (long)q, q[10],q[11], q[12]);
  14.  
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 2140KB
stdin
Standard input is empty
stdout
159043592==159043592 ? Chr