#include <iostream>
using namespace std;
void func(int x)
{
cout << "Argument passed by value : " << x << endl;
}
void func2(int &byref)
{
byref++;
cout << "Argument passed by refrence: " << byref;
}
int main()
{
func(5);
int x = 300;
func2(x);
}
Posted inC++