8. Write a C program function that uses pointers to swap to numbers.

PHOTO EMBED

Wed Aug 09 2023 13:12:52 GMT+0000 (Coordinated Universal Time)

Saved by @Codes

// Online C compiler to run C program online
#include <stdio.h>

void Swap(int *x, int *y){
    int temp = *x;
    *x = *y;
    *y = temp;
    printf("%d %d",  *x, *y);
}

int main() {
    int a = 10;
    int b = 7;
    Swap(&a, &b);
    
    return 0;
}
content_copyCOPY