allb5073 allb5073
  • 04-07-2019
  • Computers and Technology
contestada

What does the following function return? double compute speed(double distance); A. a double B. distance C. an integer D. nothing

Respuesta :

PhantomWisdom PhantomWisdom
  • 11-07-2019

Answer:

A. a double

Explanation:

The syntax of the function is:

type name( argument_1, argument_1,...... )

{  

    statement;

}

In the above syntax "type" define the return type of the function.

for example:

int count( int n);

so, it return the integer. Because the return type is 'int'.

In the question,

double compute speed(double distance);

Here, the return type is double. So, it return double.

Answer Link

Otras preguntas

Why would minerals take millions of years to form? Explain please. If you do, you will be the brainliest with an extra 18 points.
Match the British Act with the colonial reaction. 1. boycott 2. smuggling 3. Second Continental Congress 4. Boston Tea Party Answer choices are; Stamp Act,
Is the function described by the points in this table linear or nonlinear? x            y -3          9 -1
true or false the primary colors are red,blue, and green
Object a has a mass of 20 g
which ratio is proportional to 10/24 A 20/36 B 5/8 C 35/84 D 5/6
What happened after Wu Zhao’s death?
You answered 21 out of 25 questions correctly on a test. Did you reach your goal of getting at least 80%?
Why was the Civil War’s first large battle, the first Battle of Bull Run, so shocking?
The value of a professional basketball player's autograph rose 30% in the last year. It is now worth $273.00. What was it worth a year ago? A. $200.00 B.