why is my compiler keep responding as Segmentation fault: 11after i put in the numbers.
#include <stdio.h>
int main()
{
int a[10],i; // declare array and variables
printf(“enter the numbers n”);
scanf(“%d”,i);
// Read the any 10 numbers into the array
for(i=0;i<10;i++){
scanf(“%d”,a[i]);
}
printf(“even numbers of the array are: n”);
// checking whether the numbers are prime of not
for(i=0;i<10;i++){
if(a[i]%2==0){
printf(“%dn”,a[i]);
}
}
}
Expert Answer
An answer will be send to you shortly. . . . .