Question: Consider the following: struct Values { long positive _ values ; long negative _ values ; long even _ values ; long odd _ values

Consider the following:
struct Values {
long positive_values ;
long negative_values ;
long even_values ;
long odd_values ;
} ;
Write a function having the prototype:
Values count_values(long
in_array[], long in_size) ;
where in_array is an array of in_size long values.
The function should traverse the array in_array counting the number of positive values, negative values, even values, and negative values encountered and return a variable of type Values containing the information. (Zero should be considered a positive value).
Consider the following C++ code snippet:
const long SIZE =10 ;
const long THE_ARRAY[SIZE],
10,6,100,-5bar(4),3,9,8,-4,0;
Without writing a full int main () function, write the C++ statements necessary to call the function defined above.
 Consider the following: struct Values { long positive_values ; long negative_values

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!