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
The the concept of plug-and-play is demonstrated by which of the following scenarios
Vitek1552 [10]

Answer:

What are the Scenarios

I will update this when you give us them

Explanation:

5 0
3 years ago
Read 2 more answers
Write an algorithm which gets a number A, if it is even, prints even, and if it is odd prints odd.
juin [17]

Answer:

The algorithm to find A is even or odd.

  1. input A.
  2. Check the remainder on diving by 2 by A%2.
  3. If remainder is 1 then A is odd Print(Odd).
  4. If remainder is 0 print(Even).

Explanation:

To check if the number is even or odd we use modulo  operator(%).Which gives the remainder on dividing.So if we do this A%2 it will give the remainder that will come out on dividing the value of A by 2.

So if the remainder comes out is 1 then the number is odd and if the remainder is 0 then the number is odd.

7 0
3 years ago
In a class hierarchy,
kondor19780726 [428]

Answer:

The correct answer to the following question will be Option D.

Explanation:

  • A collection of nested title scopes are defined by the class hierarchy, even though a collection of nested methodologies as well as blocks see in an everything else.
  • From the all, the lexical role characterizes the connection between certain scopes of names - if method d would be decided to declare somewhere within procedure c, therefore the namespace within the namespace of c would be nested.
  • The more common classes in such a family hierarchy were near the peak of the tree as well as more specific classes are towards the edges.

Other choices have no connection with the given situation. So Option D seems to be the right response.

4 0
3 years ago
Give two examples of situations or applications where electrical circuits are used.
Pavlova-9 [17]

Answer:

lamps, electric motors

Explanation:

5 0
3 years ago
Name of main component of fifth generation of computer​
e-lub [12.9K]

Answer:In the fifth generation, VLSI technology became ULSI (Ultra Large Scale Integration) technology, resulting in the production of microprocessor chips having ten million electronic components. This generation is based on parallel processing hardware and AI (Artificial Intelligence) software.

Explanation: hope this helps ❤️

3 0
3 years ago
Other questions:
  • What three characteristics of a function are described in an IPO chart? What is performed at each characteristic?
    12·1 answer
  • The opening of the throttle plate can be delayed as long as
    13·1 answer
  • If a disk drive has 8 surfaces and there are 1024 tracks per surface with 256 sectors per track and 512 bytes/sector. What is th
    9·1 answer
  • Ou have an application running on Oracle Cloud Infrastructure. You identified that the read and write operations are slowing you
    10·1 answer
  • 1841 William Henry ____________ patents the Calotype process, exposing wet (instead of dry) paper for a much shorter amount of t
    14·1 answer
  • What are the modes of operation of WLANs?
    5·1 answer
  • Which two pieces of information must be provided when saving a file for the first time in Wordpad?____.
    8·1 answer
  • After inserting a video into your slide how can you test it
    11·1 answer
  • write an assembly program that uses the output compare function of a timer to toggle an led every second
    6·1 answer
  • Briefly explain how human thinking is mapped to artificial intelligence components
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!