Ask a Teacher



what is mean by return value? where would be it stored?

A function defined with a return type must include an expression containing the value to be returned.

When a function returns a value, the value is returned via a return statement to the caller of the function, after being implicitly converted to the return type of the function in which it is defined. The following code fragment shows a function definition including the return statement:

int add(int i, int j)
{
  return i + j; // return statement
}


comments powered by Disqus