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]
4 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]4 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
What general (system) recommendations might you make to the shop manager? (For example. if the system will be integrated, what m
Amiraneli [1.4K]

Answer:

Explanation:

1. 2 Modules that can be used for systems

integrations are

A. Automation integration modules

B. Flownex integration modules

2. Benefit of systems integration

A. It helps improves efficiency in integrating with external softwares

B. It helps with business to businesses communications and enhances interrnal co-operation within organization.

4 0
4 years ago
Software that enables you to display and interact with text and other media on the web is a web ________.
a_sh-v [17]
It's a web site or web page
5 0
4 years ago
How does a clock work
Free_Kalibri [48]

Sets of gears move inside of it that persicely move the hands onto the time. That's why watches can be so intricate and valuable.

If your looking for how to read one, it's pretty straightforward if you look it up online.

3 0
3 years ago
Read 2 more answers
The application window controls include: minimize, maximize, and close<br><br> A) true <br> B) false
Arlecino [84]

Answer:

True

Explanation:

Look at the top right of your computer while having a chrome tab open. You will see a line, a box, and a x. Hover over each and you can see the names.

6 0
3 years ago
How can your web page design communicate your personal style
Levart [38]

Answer:

Web design is very unique, you can express your feelings through creating a page.

7 0
3 years ago
Other questions:
  • Given that it takes 0.08 ms to travel from one track to the next of a hard drive; that the arm is originally positioned at Track
    6·1 answer
  • How has social media changed professional networking?
    11·1 answer
  • It's inventiveness, uncertainty futuristic ideas typically deal with science and technology.what is it?
    14·1 answer
  • In 2007, __________ Floridians died in alcohol-related collisions. A. 501B. 1,051C. 5,015D. 10,839
    8·1 answer
  • The operating system, and in particular the scheduler, is not an important component of a real-time system.
    14·1 answer
  • Use induction on n to prove that fir all n&gt;=2, 2^n+3^n&lt;5^n
    11·1 answer
  • Mindy wants to create a new subdirectory at ~/2019projects/projectx/projectplans to start storing the initial project plans for
    14·1 answer
  • What features are offered by most of the email programs with for receiving and sending messages?
    10·1 answer
  • Which of the following best describes the impact of Creative Commons?
    7·1 answer
  • When a file is used by a program, there are three steps that must be taken:
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!