HI, I saw this on internet. Not exactly sure what it wants. Why not use
mulplication instead of ADD, SUB suggested?
int CheckForZero (int a[], int n)
{
int i;
for (i = 0; i < n; i++) {
if (a[i] == 0) {
return (TRUE);
}
}
return (FALSE);
}
This code works - but it does a check for every element in 'a' - i.e.
it does 'n' compares and bails early if it finds even one zero element.
Our array 'a' generally does not have a zero. Optimize this code to
do only one compare. Feel free