Course Solutions Uncategorized (Solved) : Compiler Keep Responding Segmentation Fault 11 Put Numbers Include Int Main Int 10 Declare Q26227868 . . . .

(Solved) : Compiler Keep Responding Segmentation Fault 11 Put Numbers Include Int Main Int 10 Declare Q26227868 . . . .

 

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. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post