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
Juli2301 [7.4K]
3 years ago
6

Write a function that returns a pointer to the MAXIMUM value of an array of double values. If the array is empty, return NULL. d

ouble* maximum(double *a, int size) { }
Computers and Technology
1 answer:
marusya05 [52]3 years ago
8 0

Answer:

double* maximum(double *a, int size) {

if(size == 0)

return NULL;

int i;

double max = 0.0;

double *mp;

for(i = 0; i < size; i++){

if(a[i] > max){

max = a[i];

mp = &a[i];

}

}

return mp;

}

Explanation:

You iterate through the vector and find the maximum value. You go updating the pointer throughout the loop. I am going to write a C function

double* maximum(double *a, int size) {

if(size == 0)

return NULL;

int i;

double max = 0.0;

double *mp;

for(i = 0; i < size; i++){

if(a[i] > max){

max = a[i];

mp = &a[i];

}

}

return mp;

}

You might be interested in
Find the volume of the rectangular prism.<br>1<br>6 cm<br>32<br>cm​
Assoli18 [71]

Answer:

192 centimeters.

Explanation:

V= length x width x height

6 0
3 years ago
If a user would like to modify margins to specific settings, users would need to select the _____ option.
RSB [31]
If a user would like to modify margins to specific settings, users would need to select the <span><u>Custom Margins</u> </span>option.
4 0
4 years ago
A finance company wants to upgrade its accounting software to a higher version. This version change requires a change in data fo
Alina [70]

Answer:

The answer to this question is option b which is data re-engineering.

Explanation:

In computer science, data re-engineering is a part of the software development life cycle(SDLC). In the SDLC the data re-engineering is a technique that provides the facility to increase the size of the data formats, design,data-view, etc. It is also known as the software development process in this process, there are seven-stage for software development. If we want to upgrade the software to use the data re-engineering technique so we used the software development process. We use only this process to develop the software because there is no other process to development. So the correct answer is data re-engineering

4 0
3 years ago
Read 2 more answers
3.5 lesson practice quiz Edhesive
erik [133]

Answer:

                                                                                     

Explanation:

6 0
3 years ago
Read 2 more answers
On Windows computers, applications from Microsoft will not look and act the same as windows and menus from the operating system.
Andrej [43]

True.

Windows is an operating system built by Microsoft. Chrome and Android are operating systems built by Google. MacOS (Macbook pro etc) and iOS (iPhone, iPad, Apple Watch etc) are operating systems built by Apple.

Engineers build applications or apps for all of the above operating systems (OS). For example, Microsoft Word menus will look slightly different on Windows vs on a Mac. The underlying functionality maybe the same but the way it looks may have subtle differences.

Think of the OS as the foundation of a building. Once you have the foundation, you can build a house, a skyscraper, an office building etc depending on what you want to build.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Plz answer and dont put a random thing for the points
    11·1 answer
  • Var cookie = "username=mike2009";
    10·1 answer
  • 3. Of the following pieces of information in a document, for which would you most likely insert a mail merge field? A. First nam
    13·2 answers
  • Two technicians are discussing the voltage measurements taken on the circuit below: V1 = 12Volts; V2 = 12Volts; V3 = 0Volts; V4
    11·1 answer
  • Unit 3 Computer Programming Study Guide
    6·1 answer
  • Give a recursive implementation for the function: def is_sorted(lst, low, high) This function is given a list of numbers, lst, a
    10·1 answer
  • Consider a binary-search method in an array that reports whether an object is in the array. The documentation indicates that the
    11·1 answer
  • In this lab, your task is to complete the following: Enable all of the necessary ports on each networking device that will allow
    9·1 answer
  • The command to get out of the loop.<br>a.<br>i exit<br>ii. break<br>iii. comment<br>iv. for​
    12·1 answer
  • Political parties to address the interest of civil society<br>​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!