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

What is the acceleration of a car that maintains a constant velocity of 100 km/h for 10 sec?
The light emitted from a flame is produced when electrons in an excited state (1) absorb energy as they move to lower energy states (2) absorb energy as they mo
What is the chemical formula for iron(III) oxide? (1) FeO (3) Fe3O (2) Fe2O3 (4) Fe3O=
The Panama Canal cuts through
Which leaders of reconstruction had died by 1877
Compared to a proton, an electron has(1) a greater quantity of charge and the same sign(2) a greater quantity of charge and the opposite sign(3) the same quanti
Which organs are responsible for producing fluid to give sperm nourishment and motility?
As an atom becomes an ion, its mass number(1) decreases(2) increases(3) remains the same
Which conclusion is based on the “gold foil experiment” and the resulting model of the atom? (1) An atom is mainly empty space, and the nucleus has a positive c
What are gametes? Give examples