Need a help on truncating : <p>Hellow Guys,</p>

<p>I need to give an idea on a simple program.</p>

<p>Write a function which shortens a string to n characters. If the string is already shorter than n, the function should not change the string. Assume the prototype is</p>

<pre><code>void truncate(char *str, int inLen);
</code></pre>

<p>just give a simple explanation ..</p>

<p>Thanks</p>
