The following function is supposed to return true if any


The following function is supposed to return true if any element of the array x has the value 0 and false otherwise. It has an error. What is this error?


bool haszero(int x[], int n ) {
int i;
for (i=0; iif (x[i] == 0)
return true;
else
return false;
}

 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: The following function is supposed to return true if any
Reference No:- TGS0644898

Expected delivery within 24 Hours