How to find length of a filename? : <p>I wished to find maximum length of filename from a given set of filenames and was using the following code for the purpose:</p>

<pre><code>int Max_FnLen=strlen(files[0]-&gt;d_name);
for (i=1;i&lt;count-1;i++)
{
if(strlen(files[i]-&gt;d_name)&gt;strlen(files[i-1]-&gt;d_name))
 { 
   Max_FnLen=strlen(files[i]-&gt;d_name);
 }
}
</code></pre>

<p>But it is not giving the desired output can anyone help me with this</p>

<p>Thank You!   </p>
