#include <stdio.h>
void InverterString(char *str1) {
char aux[tamanho + 1];
for (int c = 0; c < tamanho; c++) {
aux[c] = str1[tamanho - c - 1];
}
aux[tamanho] = 0;
printf("A string1 invertida fica: %s", aux
); }
int main(void) {
InverterString("O rato roeu a roupa do rei de Roma e a rainha roeu o resto.");
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIEludmVydGVyU3RyaW5nKGNoYXIgKnN0cjEpIHsKICAgIGludCB0YW1hbmhvID0gc3RybGVuKHN0cjEpOwogICAgY2hhciBhdXhbdGFtYW5obyArIDFdOwoKICAgIGZvciAoaW50IGMgPSAwOyBjIDwgdGFtYW5obzsgYysrKSB7CiAgICAgICAgYXV4W2NdID0gc3RyMVt0YW1hbmhvIC0gYyAtIDFdOwogICAgfQogICAgYXV4W3RhbWFuaG9dID0gMDsKCiAgICBwcmludGYoIkEgc3RyaW5nMSBpbnZlcnRpZGEgZmljYTogJXMiLCBhdXgpOwp9CgppbnQgbWFpbih2b2lkKSB7CiAgICBJbnZlcnRlclN0cmluZygiTyByYXRvIHJvZXUgYSByb3VwYSBkbyByZWkgZGUgUm9tYSBlIGEgcmFpbmhhIHJvZXUgbyByZXN0by4iKTsKICAgIHJldHVybiAwOwp9Cg==