Program:

#include<stdio.h>
int main(){
int a,b,temp;
a=10;
b=8;
printf("Before Swapping\na=%d\nb=%d\n",a,b);
temp=a;
a=b;
b=temp;
printf("\n\tAfter Swapping\n\ta=%d\n\tb=%d\n",a,b);
 
 return 0;

}

Expected O/P:

Before Swapping
a=10
b=8

After Swapping
a=8
b=10