Not returning string. This program converts digit like 123 to words like "One Two Three", why in the end I am not getting anything?
<pre><code>#include&lt;stdio.h&gt;
#include&lt;string.h&gt;

char *int_to_string( int n );

void main()
{
    int n;

    printf("Enter the number : ");
    scanf("%d",&amp;n);

    printf("\n%d in words is : %s.\n",n,int_to_string(n));
}

char *int_to_string( int n)
{
    char str[100]="";

    if(n&lt;10)
    {
          switch(n)
        {
            case 0: return "Zero";
            case 1: return "One";
            case 2: return "Two";
            case 3: return "Three";
            case 4: return "Four";
            case 5: return "Five";
            case 6: return "Six";
            case 7: return "Seven";
            case 8: return "Eight";
            case 9: return "Nine";
        }
    }

    else
    {
        strcat(str,int_to_string(n/10));
        strcat(str," ");

        return strcat(str,int_to_string(n%10));
    }
}
</code></pre>

<p>Function int_to_string() should return a string containing equivalent of the number in words that is passed. it works fine for single digit number ( i.e. 0-9 ) but above that it just gives nothing.</p>