#include <stdio.h>
int swap(int*p,int*q);
int main() {
    int a,b;
    printf("enter two numbers: ");
    scanf("%d %d",&a,&b);
    printf("before swapping_ a=%d and b=%d",a,b);
    swap(&a,&b);
    printf("\nafter swapping_ a=%d and b=%d",a,b);
    return 0;
}

int swap(int*p,int*q){
    int temp;
    temp=*p;
    *p=*q;
    *q=temp;
    
    
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: