title: How can I return a character array from a function in C?
body: <p>is that even possible?
  Let's say that I want to return an array of two characters</p>
  
  <pre><code>char arr[2];
  arr[0] = 'c';
  arr[1] = 'a';
  </code></pre>
  
  <p>from a function. What type do I even use for the function? Is my only choice to use pointers and void the function? So far I've tried having a char* function or a char[]. Apparently you can only have functions of char(*[]). The only reason I want to avoid using pointers is the fact that the function has to end when it encounters a "return something;" because the value of "something" is a character array (not a string!) that might change size depending on the values I pass into the function through the main function. Thanks to anyone who responds in advance.</p>