Consider the function give below, which should return the index of first zero in input array of length $n$ if present else return $-1.$
int index of zero(int[ ] array,int n){
for(int i=0; P ;i++);
if(i==n){
return -1;
}
return i;
}
What should be placed in place code at ‘P’,So that code will work fine?
$A)$array[i]!=0 && i<=n
$B)$ array[i]!=0 && i<n