error in output of long number multiplication
<p>I have written a code in c for long number multiplication but output is not being displayed on the IDE. Please can you point out the error in the given code. Also which language is more efficient for solving these type of problems? </p>

<pre><code>#include&lt;stdio.h&gt;
#include&lt;stdlib.h&gt;
#include&lt;string.h&gt;
#define MAX 10000
void main()
{
    char ac[MAX];
    char bc[MAX];
    int a[MAX],b[MAX];
    int mul[MAX];
    int c[MAX];
    int temp[MAX];
    int la,lb;
    int i,j,k=0,x=0,y;
    long int r=0;
    long int sum = 0;
    la=strlen(ac)-1;
    lb=strlen(bc)-1;
    printf("Enter the first number : ");
    scanf("%s",ac);
    printf("Enter the second number : ");
    scanf("%s",bc);

    for(i=0;i&lt;=la;i++){
        a[i] = ac[i] - 48;
    }

    for(i=0;i&lt;=lb;i++){
        b[i] = bc[i] - 48;
    }

    for(i=lb;i&gt;=0;i--){
        r=0;
        for(j=la;j&gt;=0;j--){
            temp[k++] = (b[i]*a[j] + r)%10;
            r = (b[i]*a[j]+r)/10;
        }
        temp[k++] = r;
        x++;
        for(y = 0;y&lt;x;y++){
            temp[k++] = 0;
        }
    }
    k=0;
    r=0;
    for(i=0;i&lt;la+lb+2;i++)
        {
            sum =0;
            y=0;
            for(j=1;j&lt;=lb+1;j++){
                if(i &lt;= la+j){
                    sum = sum + temp[y+i];
                }
                y += j + la + 1 ;
            }
            c[k++] = (sum+r) %10;
            r = (sum+r)/10;
        }
    if (r==1)
        {
            c[k]=r;
        }
    j=0;
    for(i=k-1;i&gt;=0;i--){
        mul[j++]=c[i];

    }

    for(i=0;i&lt;j;j++)
        {
            printf("%d",mul[i]);
        }
}
</code></pre>