Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

***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

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93118059
  • Price:- $10

Priced at Now at $10, Verified Solution

Have any Question?


Related Questions in Computer Engineering

A sample of 1000 us households is taken and the average

A sample of 1,000 U.S. households is taken and the average amount of newspaper garbage or recycling is found to be 27.8 pounds. Assuming the standard deviation of newspaper for garbage or recycling is 2 pounds. Estimate, ...

Question suppose there is exactly one packet switch between

Question : Suppose there is exactly one packet switch between a sending host and a receiving host. Assume each link has a distance 1, 250 Km with propagation speed 2.5 times 10 8 mps. Link 1 has a transmission rate 10 Mb ...

You have been recently hired as a senior database

You have been recently hired as a senior database administrator. Your organization has many SQL Server databases that run various applications. Your manager has asked you to present to the junior database administrators ...

Question suppose you have already written the class for a

Question : Suppose you have already written the class for a Bowler. The Bowler class has two fields, a full name and a high score. Write the main() method to create two instances of this Bowler class. Get the input from ...

You are putting together a trip to kamino to pick up clones

You are putting together a trip to Kamino to pick up clones and need to take a group of droids along to help. You have 11 droids from which to select, and decide to take 4. How many different groups of droids could you t ...

Question specify design and implement a class for a card in

Question : Specify, design, and implement a class for a card in a deck of playing cards. The object should contain methods for setting and retrieving the suit and rank of a card. In C++ please

Listen to or read the transcript of this podcast

Listen to (or read the transcript of) this podcast (https://www.stlouisfed.org/education/economic-lowdown-podcast-series/episode-16-elasticity-of-demand) from the Federal Reserve Bank of St. Louis. describe your experien ...

Question suppose that in n a particular implementation of

Question : Suppose that in n a particular implementation of the MIPS single-cycle design, the lw instruction takes the longest amount of physical time to execute at 3.5 ns. What would be the theoretical maximum clock rat ...

Rgb ledsthree light-emitting diodes leds one red one green

RGB LED's Three light-emitting diodes [LEDs] (one red, one green, one blue) turn on when a number 0-7 is passed through. Red turns on with even numbers, green turns on with odd numbers, blue turns on with multiples of 3. ...

According to a recent article the average number of babies

According to a recent article the average number of babies born with significant hearing loss (deafness) is approximately four per 1,000 babies in a healthy baby nursery. The number climbs to an average of 30 per 1,000 b ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As