#include<stdio.h> #include<conio.h> #include<math.h> void zamien(int* p1, int* p2) { int g; g = *p1; *p1 = *p2; *p2 = g; } int main() { int a = 4; int b = 2; printf("a=%d\nb=%d\n", a, b); int *a1 = &a; int *b1 = &b; zamien(a1, b1); printf("a=%d\n b=%d\n", a, b); _getch(); return 0; }