Skip to content

Instantly share code, notes, and snippets.

@pim
Created February 8, 2014 12:04
Show Gist options
  • Save pim/8882679 to your computer and use it in GitHub Desktop.
Save pim/8882679 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main () {
char tab[20] = "testC++";
char *poczatek, *koniec;
poczatek = tab;
koniec = tab;
for (int i = 0; i < strlen(tab)-1; i++)
{
koniec++;
}
for (int i = 0; i < strlen(tab)/2; i++)
{
swap(*poczatek, *koniec);
poczatek++;
koniec--;
}
cout<<tab;
cout<<endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment