Actually in C, only call by value is possible
In GATE, they give the question with call by value but they can say what happened if it is call by reference. then simply u can assume like it is a global variable.
void change(int a,int b)
{
int temp=a;
a=b;
b=temp;
}
int main()
{
int i1=10,i2=20;
swap(i1,i2);
printf("i1 = %d, i2 = %d \n");
}
o/p :- i1=10,i2=20 ------------ by default, as per C, call by value
o/p :- i1=20,i2=10 ----------- if they specified call by reference
Credit to @ Arjun sir