#include <stdio.h>
#include <string.h>

int main()
{

    int i = 0,a = 0;
    char str[1000] = "BRUNNY;PR;MG;T;Câmara dos Deputados, Edifício Anexo;4;, gabinete nº;260;Brasília - DF - CEP 70160-900;3215-5260;3215-2260;08;21;dep.brunny@camara.leg.br;BRUNNY;Exma. Senhora Deputada;BRUNIELE FERREIRA GOMES";
    //scanf("%[^\n]s", str);

    char *letra = str;
    int separadores = 0;

    while (*letra != '\0'){
        if (*(letra++) == ';') separadores++;
    }

    char* palavras[separadores];
    char *palavra = strtok(str, ";");

    while (palavra != NULL){
        palavras[i++] = palavra;
        palavra = strtok(NULL, ";");
    }
    
    for (i = 0; i < separadores; ++i){
        printf("\n%s", palavras[i]);
    }
}
