your code went to infinite loop because the variable C on which your for loop is based on to iterate is not incremented properly
There are some mistakes in your code to be corrected inorder to get desired output
#include <stdio.h>
int a[2],b[3],c;
int d[2]={0},i;
int main()
{ printf ("Write the range where you wnat to test divisiblity :\n");
scanf("%d",&a[0]);
scanf("%d",&a[1]);
printf ("\nBy which three numbers you want to test divisiblity ;\n");
//input
scanf ("%d",&b[0]);
scanf ("%d",&b[1]);
scanf ("%d",&b[2]);
for (c=a[0]; c<=a[1]; c++)
{
if (c%b[0]==0|| c%b[1]==0||c%b[2]==0)
{
d[0]++;
}
else
{
d[1]++;
}
}
printf("Total numbers that ranges from %d to %d and \nthat are divisible by 2,3 or 5 is %d",a[0],a[1],d[1]);
printf("\nTotal numbers that ranges from %d to %d and \n that are not divisible by 2,3 or 5 is %d",a[0],a[1],d[2]);
return 0;
}