title: strncpy overwrites existing character string
body: <p>I've created a function to convert a number into a roman numeral. I know the logic of the conversion itself is correct, however, each time strncpy is called, it overwrites the previous value of "rom". I even tried calling it back to back and it only returned the latter. </p>
  
  <p>Here's a snippet from the code:</p>
  
  <pre><code>   char* rom = (char*) calloc (10,sizeof(char));
  
      while(intval&gt;=1000){
          intval -= 1000;
      strncpy(rom,"M",2);
      }
  </code></pre>
  
  <p>Maybe using calloc is part of the issue, but I tried using malloc and it gave me the same result. </p>