#include<stdio.h>
#include<stdlib.h>
char *alocar_palavra() {
return palavra;
}
char *alocar_frase() {
char letra;
int k = 0;
char *frase = NULL;
do {
frase[k++] = letra;
} while (letra != '$' && letra != '\n');
return frase;
}
int main() {
char *frase = alocar_frase();
char *palavra = alocar_palavra();
}
//https://pt.stackoverflow.com/q/219715/101
I2luY2x1ZGU8c3RkaW8uaD4KI2luY2x1ZGU8c3RkbGliLmg+CgpjaGFyICphbG9jYXJfcGFsYXZyYSgpIHsKICAgIGNoYXIgKnBhbGF2cmEgPSBtYWxsb2MoMjApOwogICAgc2NhbmYoIiAlcyIsIHBhbGF2cmEpOwogICAgcmV0dXJuIHBhbGF2cmE7Cn0KCmNoYXIgKmFsb2Nhcl9mcmFzZSgpIHsKICAgIGNoYXIgbGV0cmE7CiAgICBpbnQgayA9IDA7CiAgICBjaGFyICpmcmFzZSA9IE5VTEw7CiAgICBkbyB7CiAgICAgICAgbGV0cmEgPSBnZXRjaGFyKCk7CiAgICAgICAgZnJhc2UgPSByZWFsbG9jKGZyYXNlLCBrICsgMSk7CiAgICAgICAgZnJhc2VbaysrXSA9IGxldHJhOwogICAgfSB3aGlsZSAobGV0cmEgIT0gJyQnICYmIGxldHJhICE9ICdcbicpOwogICAgcmV0dXJuIGZyYXNlOwp9CgppbnQgbWFpbigpIHsKICAgIGNoYXIgKmZyYXNlID0gYWxvY2FyX2ZyYXNlKCk7CiAgICBjaGFyICpwYWxhdnJhID0gYWxvY2FyX3BhbGF2cmEoKTsKICAgIHByaW50ZigiJXMiLCBmcmFzZSk7CiAgICBwcmludGYoIiVzIiwgcGFsYXZyYSk7Cn0KCi8vaHR0cHM6Ly9wdC5zdGFja292ZXJmbG93LmNvbS9xLzIxOTcxNS8xMDE=