Ad
  • Custom User Avatar

    When using C, the test case expects a pointer type string, the problem with this is that any value you attempt to return will be the address of a local variable that will then be available memory for the program on exit, in other words, the value of the returned string will be erased or changed. I would allocate memory for that purpose, but this will be a bad behavior as I'm not in control of when to free the allocated memory. Has anyone tried it on C? Maybe using ENV variables?