Back To C++ User Defined Functions Index
//program to pass integer arguments to function using call by value method #include
#include
void swap(int a,int b) //example of call by value { 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 "<