Explain ""The returnStatement"" with example.
Answers
Answered by
0
Answer:
The return statement terminates the execution of a function and returns control to the calling function. Execution resumes in the calling function at the point immediately following the call. A return statement can also return a value to the calling function. See Return Type for more information.
For example, the following function returns the square of its argument, x , where x is a number. If the value is omitted, undefined is returned instead.
HOPE IT HELPS........
Answered by
1
The return Statement
- The return statement returns the progress of the accomplishment to the function from where it is requested.
- This description does not mandatorily demand any conditional statements.
- As soon as the statement is executed, the progress of the program ends promptly and return the direction from where it was pronounced.
- The return statement may or may not return anything for a void function, but for a non-void function, a return value is needed to be returned.
- Syntax is return[expression].
- void sample()
- {
- printf("Example of return statement");
- return;
- }
- int main()
- {
- sample();
- return 0;
- }
Learn more on return statement:
https://brainly.in/question/6203457
What role does the return statement plays
https://brainly.in/question/15435199
Write the use of Return statement
Similar questions
Social Sciences,
5 months ago
Science,
5 months ago
Computer Science,
11 months ago
Biology,
1 year ago
Math,
1 year ago