The extract function finds the positive numbers in the


***C PROGRAMMING***

Help with a program positive.c that include the following function:

void extract(int *a, int n, int *positive, int *size);

The function should use pointer arithmetic, not subscripting.

The extract function finds the positive numbers in the array a and store in array positive. The third parameter is array of positive numbers, and The fourth parameter size points to a variable in which the function will store the number of positive numbers in the array.

In the main function, ask user to enter array length, declare input array with length, and output array with the same length, and call the function. The function will store the actual length of the array storing the positive numbers. The main function should display the result.

Example i/o:

Enter the length of the array: 8

Enter the elements of the array: -12 0 4 0 36 7 -89 45

Output: 4 36 7 45

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: The extract function finds the positive numbers in the
Reference No:- TGS02926025

Now Priced at $10 (50% Discount)

Recommended (93%)

Rated (4.5/5)