प्रोग्राम कॉल-बाई-रेफरेंस
#include<iostream>
using namespace std;
int main()
{
int count=0;
void update (int &);
cout<<"count="<<count <<"\n";
update (count);
cout<<"count="<<count;
return 0;
}
void update (int &x)
{
x= x+1;
}
प्रोग्राम का आउटपुट होगा
count=0
count=1