fork download
  1. #include <stdio.h>
  2.  
  3. char* test1 (char in[])
  4. {
  5. in = "test 1 \n";
  6. return in;
  7. }
  8.  
  9. char* test2 (char* in)
  10. {
  11. in = "test 2 \n";
  12. return in;
  13. }
  14.  
  15. int main(void)
  16. {
  17. char a[255] = "error";
  18. char*b = test1(a);
  19. printf(b);
  20. char*c = test2(a);
  21. printf(c);
  22. return 0;
  23. }
  24.  
Success #stdin #stdout 0s 2112KB
stdin
Standard input is empty
stdout
test 1 
test 2