title: Can/Why using char * instead of const char * in return type cause crashes?
body: <p>I read somewhere that if you want a C/C++ function to return a character array (as opposed to std::string), you must return const char* rather than char*. Doing the latter may cause the program to crash.</p>
  
  <p>Would anybody be able to explain whether this is true or not? If it is true, why is returning a char* from a function so dangerous? Thank you.</p>
  
  <pre><code>const char * my_function()
  {
      ....
  }
  
  void main(void)
  {
      char x[] = my_function();
  }
  </code></pre>