i have tested many input cases for my next palindrome problem it is running fine in my dev c++ compiler…but it is showing wrong ans why?

```
int main()
{
long int i=0,sum,num,n,k,r,c=0,m,z;
long int arr[10000];
scanf("%ld",&n);
for(k=0;k<n;k++)
{
scanf("%ld",&arr[k]);
}
while(i<n)
{
m=arr[i];
while(m<=100000000)
{
z=m+1;
k=m+1;
sum=0;
while(k>0)
{
r=k%10;
k=k/10;
sum = sum *10+r;
}
if (sum==z)
{
printf("%ld\n",z);
c=1;
}
if(c==0)
m=m+1;
else
break;
}
i=i+1;
c=0;
}
return 0;
}
```