fork download
  1. #include <stdio.h>
  2. #include<string.h>
  3.  
  4. int write(char** value)
  5. {
  6. *value = "true"; //is this literal written to the memory allocated in main???
  7. // char temp[] = "true";
  8. // strcpy( *value, temp);
  9. }
  10.  
  11.  
  12. int main()
  13. {
  14. char * value = (char*)malloc(5* sizeof(char));
  15. write(&value);
  16. printf("%s", value);
  17. free(value);
  18. }
Runtime error #stdin #stdout 0.02s 1852KB
stdin
Standard input is empty
stdout
Standard output is empty