why am i getting error in this program?

#include<stdio.h>
main()
{
int a,b,c,d=0;
int i[10];
scanf("%d",&a);
for(b=0;b<a;b++)
{
scanf("%d",&i[b]);
}
for(b=0;b<a;b++)
{
d=0;
for(c=i[b];c>0;c=c/10)
{
d=d+c%10;
}
printf("%d",d);
printf("\n");
}
}

Can you please share the link to the question

//