int a[5] = {1, 2, 5, 2, 1}; a[4] = a[3]; a[3] = a[2]; a[2] = a[1]; a[1] = a[0]; a[0] = //Some input
#include <cstring> //... int a[5] = {1, 2, 5, 2, 1}; memmove(&a[1], &a[0], sizeof(a)-sizeof(a[0]));
memmove
for
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)