title: Reversed source string into destination
body: <p>I am trying to reverse a string and write the reversed string into a destination. I have to use the same basic structure and cannot figure out what it wrong with my reverse function.</p>
  
  <pre><code>void reverse(const char source[], char destination[]) {
  
  if(source = 0){
      return;
  }
  else
  {
      reverse(source+1, destination);
      destination[strlen(source)-1]=source;
  }
  
  }
  
  void testingReverse() {
      const char *sources[] = {
      "Welcome to CMPSC 311!",
      "abcdef",
      "_ ab  cd  ef *"
  };
      const char *expected[] = {
      "!113 CSPMC ot emocleW",
      "fedcba",
      "* fe  dc  ba _"
  };
      char destination[50];
      int i;
      for (i = 0; i &lt; 3; i++) {
          printf("source: \"%s\"\n", sources[i]);
          memset(destination, 'x', 49);
          destination[49] = 0;
          reverse(sources[i], destination);
          printf("destination: \"%.49s\"\n", destination);
          if (strcmp(destination, expected[i]) == 0) {
              printf("----pass----\n");
          }
          else {
              printf("----fail----\n");
          }
      }
  }
  </code></pre>
  
  <p>Following is the result I am getting right now.</p>
  
  <pre><code>Testing reverse:
  
  source: "Welcome to CMPSC 311!"
  
  Segmentation fault: 11
  </code></pre>