I was coding some homework (101 level). When I tried to compile the code, I got some virus alert from bit defender:
#include <stdio.h>
int main ( void ) {
int numbers [10];
int i, temp;
for (i = 1; i <= 10; ++i)
numbers[i] = 0;
printf("Enter up to 10 integers. input '-1' to finish \n");
for (i = 0; i < 10; i++) {
scanf("%d", &temp);
if (temp == -1) {
break;
} else {
numbers [i] = temp - 1;
}
}
for (i = 1; i <= 10; ++i)
printf("the numbers are: %d\n", numbers[i]);
return 0;
}
I believe the problem is with this piece of code:
for (i = 1; i <= 10; ++i)
numbers[i] = 0;
Why the trojan virus alert? what did I do?