#include <stdio.h>
void swap(int *a, int *b) {
int temp = *a;
*a = *b;
*b = temp;
}
int main() {
int x = 5, y = 10;
printf("Prima dello scambio: x = %d, y = %d\n", x, y);
swap(&x, &y);
printf("Dopo lo scambio: x = %d, y = %d\n", x, y);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: