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
Artist 52 [7]
3 years ago
14

Write a function that returns a pointer to the maximum value of an array of float ingpoint data: double* maximum(double* a, int

size) If size is 0, return NULL.
Computers and Technology
1 answer:
Andru [333]3 years ago
5 0

Answer:

double * maximum( double arr[], int size){

   int max = 0;

   if ( size == 0){

       return 0;

   } else {

        for (int i = 1; i < size; i++){

           if (arr[i] > arr[0]){

               max = arr[i];

           } else {

               max = arr[0];

           }

         }

         return max;

   }

}

Explanation:

The C++ source code above returns the maximum value of an array as a pointer. The function accepts two parameters, the array in question and the size of the array. The for loop iterates over the items in the array and checks for the largest, which is returned as a pointer since the function "maximum" is defined as a pointer to the floating-point number memory location.

You might be interested in
Who is typically considered to be the father of computing
Tanzania [10]
Charles Babbage is most often considered to be the father of computing after his invention of the  Analytical Engine in 1837 which contained <span>Arithmetic Logic Unit (ALU), basic flow control, and integrated memory which served as a general-purpose computer concept (and also very ahead of time in 1837).</span>
7 0
3 years ago
Hurry answerrrrrrr pleaseee
natka813 [3]

Answer:

bright colors around dull surroundings

Explanation:

4 0
3 years ago
Read 2 more answers
What are some of the advantages of using the F measure (weighted harmonic mean) over using the Precision &amp; Recall when evalu
Art [367]

Answer and Explanation:

Some of the advantages of using the F measure (weighted harmonic mean) over using the Precision & Recall when evaluating an IR system performance are as follows-

  • Precision quantifies the number of positive class predictions that actually belong to the positive class.
  • Recall quantifies the number of positive class predictions made out of all positive examples in the dataset.
  • F-Measure provides a single score that balances both the concerns of precision and recall in one number.
  • A measure that combines precision and recall is the harmonic mean of precision and recall, the traditional F-measure or balanced F-score:

F=2((precision.recall)/(precision+recall))

6 0
3 years ago
The negotiators past relationship will affect current behavior if the parties
denis-greek [22]

A. if they have been previously competetive

6 0
3 years ago
Could I use a prepaid card to buy a Brainly membership because I tried to get the trial with a low balance but more than like 5$
EleoNora [17]

Answer:

hey mate !

Explanation:

I think you should ask to brainly itself .....or maybe use it without subscription.... And maybe that would help : )

8 0
3 years ago
Other questions:
  • Which statements describe the advantages of using XML?
    12·2 answers
  • If you have a list of words that you wish me to make into a bulleted list, you must first highlig or ______ The words with the c
    13·1 answer
  • One of the original forms of viruses, is usually stored on some form of removable media. When the removable media is connected t
    9·1 answer
  • What are pixels? A. Objects that are part of a particle system B. Tiny colored dots that make up images and text on a computer s
    9·1 answer
  • Which stage of the waterfall model is most like the simple model's stage 5?
    12·1 answer
  • What is "the last mile of broadband access"? Why is this a problem and what kind of impact does it have on the business world an
    9·1 answer
  • Assume that the variables v, w, x, y, and z are stored in memory locations 200, 201, 202, 203, and 204, respectively.
    6·1 answer
  • what version of the internet do we use as an interactive social system in which users are able to interact with senders
    7·1 answer
  • Given two strings s and t of equal length, the Hamming distance between s and t, denoted dH(s,t), is the number of corresponding
    6·1 answer
  • Suppose in an Excel spreadsheet, the value in cell A1 is 25. By using the Macabacus local currency cycle shortcuts (Ctrl + Shift
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!