pass by reference in c

here ,no duplicates will be formed .but the addresses are referred. Here the addresses of calling functions are passed to the called function. If we make any changes with original ones, it will affect both calling and called values

#include
void interchange(int *number1,int *number2)
{
int temp;
temp = *number1;
*number1 = *number2;
*number2 = temp;
}
int main() {
int num1=10,num2=20;
interchange(&num1,&num2);
printf("\nNumber 1 : %d",num1);
printf("\nNumber 2 : %d",num2);
return(0);
}

output:

Number 1 : 20
Number 2 : 10

here interchange will take place .because we use addresses of calling function