1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ANEK [815]
3 years ago
8

Write a function that determines the maximum and minimum values from a one-dimensional array. Assume that the corresponding func

tion prototype statement is void ranges(int x[], int npts, int *max_ptr, int *min_ptr) where npts contain the number of values in array x, and max_ptr and min_ptr are pointers to the variables in which to store the maximum and minimum values in the array.
Computers and Technology
1 answer:
erica [24]3 years ago
8 0

Answer:

void ranges(int x[], int npts, int *max_ptr, int *min_ptr)

{

   *max_ptr=*min_ptr=x[0];

   for(int i=1;i<npts;i++)

   {

       if(x[i]>*max_ptr)        //this will put max value in  max_ptr

           *max_ptr=x[i];

       if(x[i]<*min_ptr)  //this will  put min value in min_ptr

           *min_ptr=x[i];

   }

}

Explanation:

The above function can be called like :

                                    ranges(x,n,&max,&min);  

where x is array and n is number of elements and max and min are address of variables where maximum and minimum values to be stored respectively.

You might be interested in
Colin Mackay Inc., a software company with its head office in Amsterdam, has employees across three continents. The company's pr
Andrei [34K]

Answer:

B) shared workspace

Explanation:

There are various terms which are shown below:

Blogging: Blogging is the site in which the person shares its views and opinions about a certain topic. So that it can spread their knowledge throughout the world

Shared workspace: As the name suggests it is a document that is shared with the team members so that they can track any change made by the other team members so that it avoids the duplicate of files. It also reduced the cost and time.

Instant messaging: It is an online chat in which the receiver and the sender communicate with each other in a real-time

Cross-linking: The cross-linking is the technique which links one site to another with a motive to access another site.

So, according to the given scenario, the most appropriate option is b.

7 0
3 years ago
How to use access?<br> like working in access and bringing tables and stuff
zheka24 [161]

I would recommend first familiarizing yourself with the program Access by watching introductions.

If you have even more time to spare and want hands-on experience, use Wise Owl exercises. Search up college classes assignments or guides. (Boy, do they love their big workbooks.) Essentially, do practice exercises.

5 0
2 years ago
In the process of benchmarking for a variable expense (such as payroll) the typical metrics used are "Total Dollars" and "Dollar
gregori [183]

Answer: True

Explanation:

5 0
2 years ago
The central processing unit (CPU) processes the data in a computer systenpical data processing includes:
spin [16.1K]
Permoryin to, tho e k k j d
5 0
3 years ago
HELP ME ILL GIVE BRAINLY Input 50 numbers and then output the average of the negative numbers only. Write in pseudocode!
Mumz [18]

Answer:

The explanation is for 10 inputs though. You'd have to follow these steps to find input 50 numbers.

Explanation:

This is how I wrote it in the Plain English programming language which looks like pseudo-code but compiles and runs (to save you all the rest of the steps):

To run:

Start up.

Write "Enter 10 numbers separated by spaces: " on the console.

Read a reply from the console.

Loop.

If the reply is blank, break.

Get a number from the reply.

Add 1 to a count.

Add the number to a total.

Repeat.

Write "The total is: " then the total on the console.

Put the total divided by the count into an average.

Write "The average is: " then the average on the console.

Refresh the screen.

Wait for the escape key.

Shut down.

3 0
3 years ago
Other questions:
  • Playville is a tiny town in fictional middle earth, which is inhabited by dwarves and elves. Playville has a playground to which
    6·1 answer
  • Device that converts sound into electrical signals, which are sent to the computer or other recording device
    6·1 answer
  • What's the best way to change the font size of all your notes pages at once?
    6·1 answer
  • You modify a document that is saved on your computer. Where are the changes stored until you save the document?a. Radom access m
    15·1 answer
  • Write a program in c++ that asks the user for a sequence of n​integers, where the user provides the number of elements n​ then e
    12·1 answer
  • Explain briefly why every person in the world is not connected to the Internet.
    9·1 answer
  • The average price of milk increased from $3.00 last year to $3.50 this year. This is most likely due to:
    14·1 answer
  • What are the physical aspect of a presentation​
    7·1 answer
  • Plz help Complete the sentence.
    11·2 answers
  • Which of the following is not considered essential for an electronic device to be called a computer?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!