fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. int* fun();
  4.  
  5. int main()
  6. {
  7. int *a = fun();
  8. printf("%d",*a);
  9.  
  10. return 0;
  11. }
  12. int* fun()
  13. {
  14. int *a =(int*) malloc(sizeof(int));
  15. *a = 10;
  16. free(a);
  17. return a;
  18.  
  19. }
Success #stdin #stdout 0s 10320KB
stdin
Standard input is empty
stdout
Standard output is empty