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

agents of what ? deposit sediments are when they lose their energy of motion
If an object is moving at the speed of 36 kilometers per hour, how many meters does it travel in one second?
What is the answer for -0.04 times -0.1?
How do you write 317 in words?
Y=1.40x 14.25 solving for x
What is the concept and justification of Manifest Destiny
What causes rickets? lack of calcium lack of vitamin D lack of vitamin C lack of adequate sunlight
Why were the shinto and buddhism important to the development of japanese culture?
Is treating members of a particular race differently than other people.
Erica went shopping for new clothes for school. She bought a pair of jeans for $70.19 and several shirts for $8.63 each. If x represents the number of shirts sh