fork download
  1. #include <stdio.h>
  2.  
  3. typedef struct
  4. {
  5. int a;
  6. int b;
  7. } foo;
  8.  
  9. int main(void) {
  10.  
  11. foo *ptr1 = malloc(sizeof(foo));
  12. void *ptr2 = NULL;
  13.  
  14. ptr1 = ptr2;
  15.  
  16. ptr2 = ptr1 + 1;
  17.  
  18. free(ptr1);
  19.  
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Standard output is empty