title: What is another alternative to strcat and strncat functions in C?
body: <p>This is the specific section of code where I am facing issues using both <code>strcat()</code> and <code>strncat()</code> functions to concatenate two strings.</p>
  
  <p>The <code>strcat()</code> function is declared as <code>char *strcat(char *dest, const char *src)</code> and <code>strncat()</code> as <code>char *strncat(char *dest, const char *src, size_t n)</code>, however both of them give issues when the second parameter is a single character from  string, i.e., which does not end with <code>'\0'</code>. I need to concatenate the a character to a string.</p>
  
  <p>So is there any alternative to these two functions or is there any way to make these functions work for me?</p>
  
  <pre><code>    char *cipher_str = (char *)malloc(sizeof(char) * 26);
      for (int j = 0; j &lt; col; j++) {
          for (int i = 0; i &lt; col; i++) {
              if (min == cipher[0][i] &amp;&amp; (done[i] != 1)) {
                  done[i] = 1;
                  for (int k = 0; k &lt; rows; k++)
                      strcat(cipher_str, cipher[i][k]);
                  }
              }
              ...
  </code></pre>