define the return statement in computer


Define The Return Statement in Computer Programming?

The return statement is used for two purposes once the return statement is executed the program control will be immediately passed back to the calling environment and If the return statement contains an expression then the value of the expression is passed back to the calling environment as well and this value will be converted, if necessary to the type of the function as specified in the function definition and If no type is explicitly declared the type is implicitly "int".

A return statement has one of the subsequent forms:
return;
return expression;

Some illustrations are

return(3);
return(a*b);

The expression being returned can be enclosed in parentheses but it's not essential.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: define the return statement in computer
Reference No:- TGS0304289

Expected delivery within 24 Hours