#include <stdio.h>
#define MAX 500
int main() {
char text [MAX+1];
printf("Informe o texto (tamanho maximo %d caracteres:", MAX
); fgets(text
, sizeof(text
), stdin
); text[0] = '*';
for (int i = 0; i <= MAX; i++) {
if (text[i] == ' ') {
text[i + 1] = '*';
}
}
printf("\nO texto final e %s\n", text
); }
I2luY2x1ZGUgPHN0ZGlvLmg+CiNkZWZpbmUgTUFYIDUwMAoKaW50IG1haW4oKSB7CgljaGFyIHRleHQgW01BWCsxXTsKCglwcmludGYoIkluZm9ybWUgbyB0ZXh0byAodGFtYW5obyBtYXhpbW8gJWQgY2FyYWN0ZXJlczoiLCBNQVgpOwoJZmdldHModGV4dCwgc2l6ZW9mKHRleHQpLCBzdGRpbik7Cgl0ZXh0WzBdID0gJyonOwoJZm9yIChpbnQgaSA9IDA7IGkgPD0gTUFYOyBpKyspIHsKCQlpZiAodGV4dFtpXSA9PSAnICcpIHsKCQkJdGV4dFtpICsgMV0gPSAnKic7CgkJfQoJfQoJcHJpbnRmKCJcbk8gdGV4dG8gZmluYWwgZSAlc1xuIiwgdGV4dCk7Cn0=