what is wrong in this code??

#include<stdio.h>
int main()
{
int t,num,x,temp,arr[200],i,j,m;

scanf("%d",&t);
while(t--)
{	
	scanf("%d",&num);
	arr[0]=1;
	m=1;
	
	for(i=1;i<=num;i++)
	{
		temp=0;
		for(j=0;j<m;j++)
		{
			x=arr[j]*i+temp;
			arr[i]=x%10;
			temp=x/10;	
		}
		while(temp>0)
		{
			arr[m]=temp%10;
			temp=temp/10;
			m++;

		}
	}
	for(i=m-1;i>=0;i--)
	{
		printf("%d",arr[i]);
	}
	printf("\n");
}

}

Did you see this? The things wrong with your code are:

    temp=0;  // this is inside the for loop of i, which should not be
    for(j=0;j<m;j++)
    {
        x=arr[j]*i+temp;
        arr[i]=x%10;   // arr[j]= x%10;, not arr[i]. j is the index for your digit
        temp=x/10;  
    }

ya… but i want to know what is wrong in my above code???

Your implementation is wrong, see the edit above.