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
Get step-by-step solutions from verified subject matter experts
