#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void trocar(char **a, char **b) {
char *novo = *a;
*a = *b;
*b = novo;
}
int main() {
trocar(&a, &b);
printf("a: %s, b: %s\n", a
, b
); }
//https://pt.stackoverflow.com/q/344274/101
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHN0cmluZy5oPgoKdm9pZCB0cm9jYXIoY2hhciAqKmEsIGNoYXIgKipiKSB7CiAgICBjaGFyICpub3ZvID0gKmE7CiAgICAqYSA9ICpiOwogICAgKmIgPSBub3ZvOwp9CgppbnQgbWFpbigpIHsKICAgIGNoYXIgKmEgPSBtYWxsb2MoMyk7CiAgICBzdHJjcHkoYSwgIm9pIik7CiAgICBjaGFyICpiID0gbWFsbG9jKDYpOwogICAgc3RyY3B5KGIsICJ0Y2hhdSIpOwogICAgdHJvY2FyKCZhLCAmYik7CiAgICBwcmludGYoImE6ICVzLCBiOiAlc1xuIiwgYSwgYik7Cn0KCi8vaHR0cHM6Ly9wdC5zdGFja292ZXJmbG93LmNvbS9xLzM0NDI3NC8xMDE=