answersLogoWhite

0


Best Answer

It means end the function. Functions automatically end when execution reaches the end of the function, but you can return from a function at any point within the function with a return statement.

If the function returns a value to its caller, you must provide a reachable return statement along with the value you wish to return.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

A return statement is used in a code to return the program to the main program after a subprogram has been completed.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

To return a value as output of processing the current method that is being executed.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

Leaving the actual function, and returning a value (if the return type is not 'void').

Example#1: return 3.1415926;

Example#2: return;

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

It has two purposes. The first is to terminate a function before the end of its scope, and the second is to have that function return a value to the function which called that function.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

Returns from a functions. What a surpise.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is a return statement used for?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How does return statement work in vb?

No Return statement in VB programming


Explain goto and return in c?

A return statement is used to transfer the program control flow to the function that has called the current function under execution. If the function is main, then the program returns the control flow to the operating system. The syntax for return statement is:return return-type;A goto statement is used to transfer the control flow to a particular labelled statement, not necessarily back to the calling program. There are somerestrictionson using a goto statement. For eg: the goto statement should not skip any variable declarations. The use of goto statement is usually considered as a bad programming practice. The syntax for goto statement is:goto label_name;....label_name: statements;


What is the term used for the memory address of the location of the statement immediately after the module call?

The return address.


What statement returns a value from a function?

return


What is return statement under function in turbo C?

return 0


How do you use return function?

return;orreturn ;PS: not function, statement!


What is return in programming?

The return statement is used in functions to return control to the caller. If the function is declared non-void, the return statement also allows the programmer to return a value to the caller.


A musical statement followed by a contrasting statement and then a return of the original statement would be called?

it is ternary form


Can you take return type in void?

a void has no return statement. If that is what ur asking


How do you use return?

In C/C++ programming and most other procedural languages, you use a return statement to return control to the calling function. In the case of the global main function, a returnstatement terminates the program, releasing all memory used by the program and returning control to the execution environment.Functions that return void do not return a value and therefore do not require a return statement, unless the function needs to return early (before falling off the end of the function). Functions that return values must use a returnstatement to return the appropriate value to the caller.In C++ (but not in C), the global main function does not require a return statement unless returning early. When omitted, the global main function implicitly returns the value 0 (to the execution environment) when execution falls off the end of the function. To return any other value, a return statement is required.


Is it possible to print both if statement and else statement?

Yes int main (void) { puts ("if statement"); puts ("else statement"); return 0; }


Three-part form can be represented as?

ABA For that can be represented as statement (A) Contrast (B) Return of Statement(A)