Question: Write a C program to find how many positive and negative numbers there are inside a 10-element array using the function having the prototype below:

Write a C program to find how many positive and negative numbers there are inside a 10-element array using the function having the prototype below:

void howMany(int *array, int *posPtr, int *negPtr);

In main function, array values must be filled with random integers in the interval [-100, 100] and printed on the screen. The number of positives and negatives should also be printed in the main function.

EXAMPLE OUTPUT :

10 random numbers generated = 21 -97 -61 54 -81 23 77 -4 46 12

-------------------------------

Number of positive integers = 6 Number of negative integers = 4

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!