I am working on a coding problem "find the smallest number from inputs", I take inputs in the form of for loop and store them in an array. Its working fine for total inputs less than 11 but for greater than 11 it only takes 10 inputs and then breaks.
printf("HOW MANY NUMBERS DO YOU WANT TO INPUT\n");
int array_size , var1;
scanf("%d",&array_size );
var1 = array_size;
int index = 0 , array[index];
for(int index = 0; index < array_size; index++)
{
printf("inputs left: %d\n",var1);
var1 -= 1;
scanf("%d",&array[index]);
}
I expect it should take as many inputs as user desire but it only takes 10 inputs and I can't seem to find the problem.