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
What do you mean by computer ethics?​
STALIN [3.7K]

Answer:

Computer ethics is a field of applied ethics that addresses ethical issues in the use, design and management of information technology and in the formulation of ethical policies for its regulation in society.

3 0
2 years ago
Please explain what steps you will take to prevent hackers from getting access to your personal information.
yuradex [85]
The steps I would take are 1. Making a strong password with symbols and numbers. 2. I will set up a 2 way authentication ther for if someone would be trying to hack me I would get an alert in order to stop the attempt. 3 I will not use the same password each time.
4 0
3 years ago
Define the role of websites in internet.also write the importance of internet in our daily life.
BabaBlast [244]

Answer:

       

      <u> </u><u>Role of websites in internet</u>

  • Websites give the online way to the business,it helps the business to grow and reach the higher audience. There was a time,at which there is no apps only HTML/CSS websites are there so it is a building step for reaching the audience.
  • Time is a one of the major factors for growth in online sector, and websites provide a interface to use their resources and services at less time ,you don't have to go somewhere now you can order from anywhere and anytime. 24/7 hour services gives a boost to the websites.
  • Some of the Applications are Very big but you can access them in very less amount of internet. Apps never replace websites.
  • Most of the billionaires are the ones who builds there website like amazon, twitter etc. It is very important to have a website for the business        

        <u>Importance of internet in our daily life</u>

  • Internet provides various resources and services which we need at every time like booking a cab,hotel,flight,trains and tutoring services . It consist a vast variety of information which is required at every moment .
  • We really don't need any physical presence of someone to learn something , to understand or for asking it is enough up on internet. Things are changing as technology grows.
  • For leisure time, it provide social sites to enjoy and there are much good options to ask the question of any subject.      
  • It also give option to promote business , it helps to reach to higher audience, many companies give services to us as there business. Digital marketing is also up there to promote on social sites.
3 0
3 years ago
Where are you jaymann ive been looking for you
LuckyWell [14K]

Answer:

Explanation:

[[^hewoo I’m not em but thx for points

4 0
2 years ago
Read 2 more answers
Brianna is a multimedia specialist who works for a large fast food chain. What task
Tju [1.3M]

Answer:

Recording and publishing training videos for new employees

Explanation:

Multimedia specialists design and create IT-based multimedia products such as websites, DVDs, and computer games that combine text with sounds, pictures, graphics, video-clips, virtual reality and digital animation

4 0
3 years ago
Other questions:
  • In a two-sided tag, a(n) ____ tag indicates the content's end.
    7·2 answers
  • Web 2.0 has led to a shift just from consuming content towards what
    6·1 answer
  • What port in your computer will you use to plug in your camera?
    14·2 answers
  • !WILL MARK BRAINLIEST!
    8·1 answer
  • How do you invite someone to a conversation on brainly
    14·1 answer
  • What is a common use for append queries?
    14·2 answers
  • If you do a Find and Replace for a term, where will Word begin looking for the term?
    6·1 answer
  • What is the most used gaming keyboard in 2022?
    8·1 answer
  • Which type of measurement would you use to determine the mass of sugar?
    12·1 answer
  • What do you mean by Graphics editing​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!