0
Description of the issue: "Implement the function below that takes a string and compresses it into a single character, any set of consecutive repeated characters."
function:
char *strpack(char *s)
Example of how it should work:
    strpack("Arrecadddaccao")           --> "Arecadacao"
    strpack("   AAAaaaBBB   CCCIALFFA") --> " AaB CIALFA""*
I implemented the function below:
char *strpack(char *s)
{
    int i = 0, j = 0, tam = strlen(s);
//Analisa caractere por caractere
    for(i = 0; i <= tam; i = j)
    {
//Analisa a quantidade de caracteres repetidos
        for(j = i; j <= tam; j++)
        {
            if(s[i] != s[j])
            {
//Elimina os caracteres repetidos
                s[++i] = s[j];
                break;
            }
        }
    }
    return s;
Mas, por algum motivo, a repetição só é executada uma vez. Não consegui identificar o erro.
Qualquer contribuição é bem-vinda.