Two types are call by value and call by reference.
1. Call by value:
In call by value method the copy of the original value is passed to the function, if the function makes any change will not affect the original value.
Example
#include<iostream>
using namespace std;
void swap (int x, int y)
{
}
There is no changes in the values.
2. Call by reference:
In call by reference method the address of the original value is passed to the function, if the function makes any change will affect the original value.
Example
#include<iostream>
using namespace std;
void swap (int x, int y)
{
}
There is a changes in the values.