All pastes #968447 Raw Edit

Something

public text v1 · immutable
·published 2008-04-03 01:13 UTC
rendered paste body
#include <iostream>
using namespace std;
void prevrti(char a[],int n);
main()
{

char a[] = "bobo_e_boki";

cout << a << endl;
prevrti(a,11);

cout << a << endl;
}
void prevrti(char a[], int n)
{
char *p1 = &a[0], *p2 = &a[n-1];
char t;
for(;*p1 != '_' && *p2 != '_';)
{
*p1++;
*p2--;
}

p1 = &a[0];

while(p1 != '_')
{
t = *p1;
*p1 = *p2;
*p2 = t;
*p1++;
*p2++;
}

}