fork download
  1. #include <stdio.h>
  2.  
  3. double *f (void)
  4. {
  5. double x = 1234.5678;
  6. return &x; // Orrore!
  7. }
  8.  
  9. int main (int argc, char *argv[])
  10. {
  11. double *p;
  12. p = f ();
  13. printf ("x = %f\n", *p);
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0.01s 1720KB
stdin
Standard input is empty
stdout
x = 1234.567800