Back To C++ User Defined Functions Index
//program to pass integer arguments to function using call by reference method #include
#include
void swap(int &a,int &b) //example of call by reference { int temp; temp=a; a=b; b=temp; cout<<"\ndisplaying data in swap function "; cout<<"\nvalue of a is "<
>a; cout<<"\nenter value for b "; cin>>b; cout<<"\ndisplaying data before calling swap \n"; cout<<"\nvalue of a is "<