Positive numbers in the array a and store

Assignment Help Basic Computer Science
Reference no: EM132130594

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

Reference no: EM132130594

Questions Cloud

Find minimal dfa : Find minimal dfa's for the following languages. In each case prove that the result is minimal.
Examine ucr statistics related to property crimes : Rates of property crime have risen and fallen over time. Examine UCR statistics related to property crimes. How have crime rates changed over time?
Examine each of the given profit growth scenarios : The head of the accounting department at a major software manufacturer has asked you to put together a pro forma statement of the company's value under several.
Rearranges an integer array : Need help with a C program array_rearrange.c that rearranges an integer array. The array will be split into two sets of integers one by one.
Positive numbers in the array a and store : The extract function finds the positive numbers in the array a and store in array positive. The third parameter is array of positive numbers
Discuss some of the differences in legal definitions : The one unique characteristic with juvenile delinquency is that the legal definition will vary from one state to another.
Assignment on information systems audit and controls : Elaborate on the different types of control that are applied in a hospital (Preventive, detective and corrective control).
How necessary and effective are elite counterterrorism units : What other counterterrorist options do you think may be effective without resorting to the deployment of elite units?
Graph heather budget constraint for food and entertainment : Every year, Heather hosts a holiday party for her friends. Her party budget is $200. Graph Heather's budget constraint for food and entertainment

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What is the cumulative relative frequency for the value 70

For a dataset with four unique values (55, 70, 80, and 90), the relative frequency for the value 55 is 20%, the relative frequency for 70 is 30%, the relative frequency for 80 is 20%, and the relative frequency for 90 is 30%. What is the cumulativ..

  Find the sixth term of the sequence

The first term of a geometric sequence is 9, and the common ratio is 1/3. Find the sixth term of the sequence.

  Web page and the table as shown

Produce a Web page and a Cascading Style Sheet (.css) that adds color to the page.

  Strategic planning on the it systems

Discuss two major issues involved with acquiring systems and two major issues commonly faced when maintaining them. Address how each can be minimized or overcome.

  Significant effect on the organization

Topic: Start by locating an organization that has experienced a problem or event that has a significant effect on the organization.

  Determine the expected net operating income (noi) from sales

The probabilities are 20%, 50%, and 30% for revenues of $800,000, $1,000,000, and $1,100,000 per year, respectively, and operating expenses are constant at $200,000 per year

  Derive also the quadratic interpolant through these two pair

Derive the linear interpolant through the two data points (1.0,2.0) and (1.1,2.5). Derive also the quadratic interpolant through these two pairs as well as (1.2,1.5). Show that the situation can be depicted as in Figure 10.11.

  Demonstrate this by drawing a 4-variable k-map

Demonstrate this by drawing a 4-variable K-map that has two different minimized forms for the same Boolean expression, each with the same number of terms and literals.

  How you could change the design to reduce the failure rate

There are no component failures, software bugs, or power glitches; and the errors occur mainly for customers who use the interface heavily. Suggest a possible cause of these failures and how you could change the design to reduce the failure rate.

  Using the specification below subnet the network

You are given the 10.10.10.64/24 network. Using the specification below subnet the network.

  Write paper on battery backup units

Six pages research paper that must be supported by 3-5 citations in APA format.. Please choose one from this list of propose topics: Battery Backup Units, Small Outline Rambus Module and Ram

  What is the interpretation

What is the tax equivalent yield of a triple-tax-free municipal bond yielding 3%? What is the interpretation?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd