Return With Expression
#include <stdafx.h>
#include <iostream>
using namespace std;
int display()
{
int i=10,j=20;
return (i+j)*2;
}
int main()
{
cout<< "Example of return with an expression" << endl;
int i=display();
cout << "Value of i : " << i << endl;
return 0;
}
Output:
Example of return with an expression
Value of i : 60