Anonymous
public text v1 · immutable#include <string.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
char tmp;
char *b, *e;
char* str = malloc(7);
strcpy(str,"foobar");
for (b=str,e=str+strlen(str)-1; b<e; b++,e--)
{
tmp = *b;
*b =*e;
*e = tmp;
}
printf("%s",str);
}