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

please help:P trig is confusing
What's 8 more than 3 times n
How did the Dawes Act promote assimilation?
Can you help me on algebra?
a sum of money is divided in the ratio 5 : 7 . If the larger sum is Rs 196, find the smaller sum​
what is information ? what has the present constitution stated under the " right to information " ?​
Carlo buys $14.40 worth of grapefruit. Each grapefruit costs $0.80. how many does he have
In any​ year, the weather can inflict storm damage to a home. From year to​ year, the damage is random. Let Y denote the dollar value of damage in any given yea
Solve these equations. What could x be? -16-x=0
The end points of PG are given. Find the length of segment PQ using the Pythagorean therom p(-4.3) and q(0,5)