title: Returning common chars
body: <p>My code is supposed to compare 2 strings and returns the common characters in alphabetical order. If there are no common chars, it will return a null string.</p>
  
  <p>However the program is not running.</p>
  
  <p>Code</p>
  
  <pre><code>void strIntersect(char *str1, char *str2, char *str3)
  {
  int i,j, k;
  i = 0;
  j = 0;
  k = 0;
  while(str1[i]!='\0' || str2[j]!='\0')
  {
      if(strcmp(str1[i],str2[j])&gt;0)
      {
          str3[k] = str1[i];
          k++;
      }
      else if (strcmp(str2[j],str1[i])&gt;0)
      {
          str3[k] = str2[j];
          k++;
      }
  i++;
  j++;
  }
  }
  </code></pre>
  
  <p>Example</p>
  
  <pre><code>Input string 1:abcde
  Input string 2:dec
  Output: cde
  </code></pre>
  
  <p>How do I get it to work?</p>