Question: Write a function all odd in array that returns true if all integers in an array are odd. The function will also find the

Write a function all odd in array that returns true if all integers in an array are odd. The function will also find the sum of the odd integers in the array and update a variable sum. Your function must have the following prototype: // all odd in_array(a, n, sum) returns true if all integers in the // array a of length n are odd; *sum is updated to the sum of the // odd integers in the array // requires: sum points to memory that can be updated bool all odd in_array(int a[], int n, int * sum); Provide a comment at the bottom of your file that explains the logic behind your function Activate Windows
Step by Step Solution
3.34 Rating (151 Votes )
There are 3 Steps involved in it
include stdbool h bool alloddinarrayint a int n int sum ... View full answer
Get step-by-step solutions from verified subject matter experts
