Call by reference method of passing arguments to a function that the address of an argument into the formal parameter.
#include <iostream> using namespace std; int myFunc(int *,int *); int main() { int a=10,b=75; myFunc(&a,&b); return 0; } int myFunc(int *a,int *b) { cout << "The sum is " << (*a +*b); return 0; }
The sum is 85
Comments :