Fair Rations

  • + 0 comments

    int main() { int N,i,l=0;; int B[100]; printf("enter no of people in a row"); scanf("%d",&N); printf("enter of loafs given to each individual"); for(i=1;i<=N;i++) { scanf("%d",B[i]); } for(i=1;i<=N;i++) { l=l+(B[i]/N); } if(l%2==0) { printf("%d",l); } else{ printf("NO"); } return 0; } after submitting it shows segmentation fault at each case what is segmentation fault????