fork(1) download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. void func(char *str) {
  5. strcpy(str, "fuck");
  6. }
  7.  
  8. int main(void) {
  9. // your code goes here
  10. char *str = (char *)malloc(100);
  11. func(str);
  12. puts(str);
  13. free(str);
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
fuck