不理解第三个引用函数的输出为什么a的值没有变


#include <stdio.h>
void swap(int *, int *); //prototype of the function
int main()
{
int a = 10;
int b = 20;
printf("Before swapping the values in main a = %d, b = %d\n",a,b);
swap(&a,&b);
printf("After swapping values in main a = %d, b = %d\n",a,b); }
void swap (int *a, int *b)
{
int temp;
temp = *a;
*a=*b;
*b=temp;
printf("After swapping values in function a = %d, b = %d\n",*a,*b); 
}

最后一步的int temp 为什么a还是20,b还是10呢
地址互换为什么值不变?

已经交换了啊,你a的初始值=10,b=20,交换后a=20,b=10

a初始值是10n初值是20已经交换了