hey guys, I am supposed to write 3 boolean functions listed below. my problem is that I don't really understand the questions and don't know where to start. it would be really great if someone just do one of the functions to give me an example so i could finish the rest.
WRITE A FUNCTION NAMED EQUALBUTOPPOSITE. THE FUNCTION SHOULD ACCEPT TWO INTEGER ARRAYS AND A SIZE ARGUMENT. IT SHOULD RETURN TRUE IF THE ARRAYS HAVE THE SAME VALUES, BUT IN THE OPPOSITE ORDER.
WRITE A FUNCTION NAMED AVERAGEOFNEIGHBORS. THE FUNCTION SHOULD ACCEPT AN ARRAY OF FLOATS, AND A SIZE ARGUMENT. IT SHOULD RETURN TRUE IF EACH ELEMENT IS THE AVERAGE OF IT'S NEIGHBORS ON EITHER SIDE (WITH THE EXCEPTION OF THE FIRST AND LAST ELEMENTS, THEY CAN HAVE ANY VALUE) OTHERWISE IT SHOULD RETURN FALSE.
WRITE A FUNCTION NAMED ALLVALUESAREPAIRED. THIS FUNCTION SHOULD ACCEPT AN ARRAY OF CHARS, AND A SIZE ARGUMENT. IT SHOULD RETURN TRUE IF EACH VALUE IN THE ARRAY IS INCLUDED EXACTLY TWICE. NO VALUES APPEAR JUST ONCE IN THE ARRAY, AND NO VALUES APPEAR MORE THAN TWICE.
below is my code.. i know it's totally wrong..please help!
bool equalbutOpposite(int array[],int size)
{
bool status;
if( == y)
status = true;
else
status = false;
return status;
}