Guest User

Untitled

a guest
Sep 22nd, 2016
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.19 KB | None | 0 0
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3.  
  4. char *f(void)
  5. {
  6.     char *x = malloc(20);
  7.     sprintf(x, "Hello world");
  8. }
  9.  
  10. int main()
  11. {
  12.     char *foo = f();
  13.     puts(foo);
  14.     free(foo);
  15. }
Add Comment
Please, Sign In to add comment