// wsk.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "stdio.h" #include "stdlib.h" int _tmain(int argc, _TCHAR* argv[]) { int tab[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int i, tmp; for(i = 0; i < 10; ++i) { printf("%i\n", tab[i]); } printf("\n"); int *wsk1 = &tab[0]; int *wsk2 = &tab[9]; for(i = 0; i < 5; ++i, ++wsk1, --wsk2) { tmp = *wsk1; *wsk1 = *wsk2; *wsk2 = tmp; } for(i = 0; i < 10; ++i) { printf("%i\n", tab[i]); } system("pause"); }