#include <stdio.h>
#include <string.h>
int qtd_espacos(char *str){
int espacos = 0;
while(*str){
if (*str == ' '){
espacos++;
}
str++;
}
return espacos;
}
int main () {
char str[] = "Bom dia pessoal";
int qtd_strings = qtd_espacos(str) + 1, i = 0;
char strings
[qtd_strings
][strlen(str
)]; while (pch != NULL){
}
for (i = 0;i < qtd_strings;++i){
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KCmludCBxdGRfZXNwYWNvcyhjaGFyICpzdHIpewogICAgaW50IGVzcGFjb3MgPSAwOwogICAgd2hpbGUoKnN0cil7CiAgICAgICAgaWYgKCpzdHIgPT0gJyAnKXsKICAgICAgICAgICBlc3BhY29zKys7CiAgICAgICAgfQogICAgICAgIHN0cisrOwogICAgfQogICAgcmV0dXJuIGVzcGFjb3M7Cn0KCmludCBtYWluICgpIHsKICAgIGNoYXIgc3RyW10gPSAiQm9tIGRpYSBwZXNzb2FsIjsKCiAgICBpbnQgcXRkX3N0cmluZ3MgPSBxdGRfZXNwYWNvcyhzdHIpICsgMSwgaSA9IDA7CiAgICBjaGFyIHN0cmluZ3NbcXRkX3N0cmluZ3NdW3N0cmxlbihzdHIpXTsKICAgIGNoYXIgKnBjaCA9IHN0cnRvayAoc3RyLCIgIik7CiAgICB3aGlsZSAocGNoICE9IE5VTEwpewogICAgICAgIHN0cmNweShzdHJpbmdzW2krK10sIHBjaCk7CiAgICAgICAgcGNoID0gc3RydG9rIChOVUxMLCAiICIpOwogICAgfQoKICAgIGZvciAoaSA9IDA7aSA8IHF0ZF9zdHJpbmdzOysraSl7CiAgICAgICAgcHJpbnRmKCIlc1xuIiwgc3RyaW5nc1tpXSk7CiAgICB9CgoJcmV0dXJuIDA7Cn0K