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
A _____________ is designed for a individual user.
pishuonlain [190]

Answer:

i don't know it sorry

Explanation:

7 0
3 years ago
What does the word tolerance mean in textiles?
Firdavs [7]
It means the willingness to respect or except thecustoms, beliefs, or opinions of others
4 0
3 years ago
Which statement best justifies the use of a high-speed cache in a CPU?
crimeas [40]

Cache memory is a high-speed memory that stores the instructions and data that have been frequently accessed.  It decreases the time it takes to decode the instructions stored in the instruction pipeline.

A.  It decreases the time it takes to decode instructions stored in the instruction pipeline.

<u>Explanation:</u>

Whenever an instruction is invoked or some data is accessed, the CPU looks for it in the cache memory before accessing the main memory.

If the content is found in the cache memory, it accessed from there and then and hence the access time and decode time is reduced as there were no main memory lockups.

6 0
3 years ago
What happens when your project is rendered?
jok3333 [9.3K]

Answer:

B

Explanation:

when your rendering video project your computer is processing all the data that goes into creating images you experience video rendering every time you look at your computer the images on your screen has all been rendered to produce the website photo or video you are looking at

4 0
3 years ago
The American Standard Code for Information Interchange (ASCII) has 128 binary-coded characters. A certain computer generates dat
Kay [80]

Answer:

350 kHz

Explanation:

as there are 100,000 character per sec.

so, total number of bits per sec = 100,000 * n

= 100,000 * 7 = 700,000 bits per sec

= 700 kbps

Bandwidth (BW) = total no. of bits / 2

BW = 700 kbps/2

= 350 kHz

4 0
3 years ago
Other questions:
  • You’ve received a tarball called data79.tar from a colleague, but you want to check the names of the files it contains before ex
    15·1 answer
  • A local area network works as a ____ network in that clusters of workstations are connected to a central point (hub or switch) t
    6·1 answer
  • Can someone help me with the 2.4 code practice question 2 on Edhesive???
    6·1 answer
  • Explain in three to four sentences what happens to data packets once they leave a node.
    11·2 answers
  • Instructions:Select the correct answer from each drop-down menu. What type of font color should Kim select if she chooses a dark
    10·2 answers
  • Identify a factor that is unlikely to influence the length of time people wait in the lunch line.
    8·2 answers
  • Which of the following is a true statement?
    12·2 answers
  • You are photographing your friend in a local park which of the following might be supporting details you want to include in the
    6·1 answer
  • A reference parameter differs from an output parameter in that a reference parameter ______________________ but an output parame
    5·1 answer
  • I have no idea which one please help!
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!