Return With A Parameter
#include <stdafx.h>
#include <iostream>
using namespace std;
int display()
{
int i=10;
return i;
}
int main()
{
cout<< "Example of return with a parameter" << endl;
int i=display();
cout << "Value of i : " << i << endl;
return 0;
}
Output:
Example of return with a parameter
Value of i : 10