I'm having a little bug where I'm asking the user to go in a loop and type in 1000 numbers into an array. if the user types in a letter or numbers with letters, the loops will automatically assign ret2 = 0 and it'll go into the bad input. But if i type in -99990, it'll let me go to the ret2 scanf. Is there a reason why it automatically make ret2 = 0 when I put in a letter?Code:#include <stdio.h> int main() { int i; int a[1000]; int x; int ret; int y; int ret2; printf("----type in numbers-----\n"); for(i=0;i<1000;i++) { printf("value%i: ",i); ret = scanf("%d",&a[i]); printf("\n"); if(ret == 0 || a[i] == -99990) { printf("what value do you want?"); ret2 = scanf("%d",&y); printf("\n"); if(ret2 == 0) { printf("bad input\n"); return 0; } else { printf("good input bye"); return 0; } } } return 0; }