+ 12
Consider:
int function()
{
return 0;
}
int main()
{
cout << function();
}
// outputs 0
The return keyword is used by functions to return a value back to where they are called. Different types of function have different return values and types. E.g.
char function()
{
return 'a';
}
bool function()
{
return true;
}
etc.
In main(), the value 0 is returned to the operating system, signalling that the program has run successfully.



