Ask Question
1 September, 12:41

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

+2
Answers (1)
  1. 1 September, 14:38
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers