Ask Question
7 September, 20:19

How do you return a value from a function?

+2
Answers (1)
  1. 7 September, 23:27
    0
    return instruction used to return a value from a function.

    Explanation:

    Function is a block of statement which perform the special task.

    Syntax for define a function:

    type name (parameter_1, parameter_2, ...)

    {

    statement;

    return variable;

    }

    In the syntax, type define the return type of the function. It can be int, float, double and also array as well. Function can return the array as well.

    return is the instruction which is used to return the value or can use as a termination of function.

    For return the value, we can use variable name which store the value or use direct value.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “How do you return a value from a function? ...” 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