title: Writing to char array, empty output
body: <p>I'm wondering what's occurring here, I allocate space for the dest variable outside of the reverse function. And then write to it in the function call. But my output is blank. I want to do this without malloc, purely for educational purposes. Thanks</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  /*function declaration*/
  void reverse(char *src, char *dest);
  
  int main(void) {
  
  char src[] = "hello, world";
  char dest[strlen(src)];
  reverse(src, dest);
  printf("%s\n", dest);
  
  return 0;
  }
  
  /*function reverse a string*/
  void reverse(char *src, char *dest) {
  int i;
  int j = 0;
  for(i = strlen(src); i &gt;= 0; i--) {
    *(dest+j) = *(src+i);
    ++j;
    }
  }
  </code></pre>