Write a program that contains two functions in addition to


Question: Write a program that contains two functions in addition to main. The first one takes 2 arguments (an int array and an int) and returns nothing. 

It prints the entire contents of the array argument, one element per line.

You MUST use a for loop to print the array contents. The second function takes 1 argument (an int) and returns a bool indicating whether or not the argument was even or odd. 

Be sure and include prototypes for your functions.

    Your main function should:

Declare an int array of size 3.

Prompt the user for the contents of each array element. Store each input in the array that you declared in Step 1. The user prompt and assignment statements MUST be inside the body of a for loop.

Call the first function that prints an array, passing it the filled array and the array size.

Repeatedly call (using a for loop) the second function each time passing it a different element in the array until all elements have been passed.   Based on the return value of the function, display a message like: " ______ is odd" or "_____ is even"

You need to make well-formed and clean code. You should not copy and paste the code from other source.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a program that contains two functions in addition to
Reference No:- TGS0946579

Expected delivery within 24 Hours