Ask Question
18 January, 22:40

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

+4
Answers (1)
  1. 18 January, 23:15
    0
    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.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “What does the following function return? double compute speed (double distance); A. a double B. distance C. an integer D. nothing ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers