ATTIC- WRONG ANSWER

what is wrong in dis code??

#include<stdio.h> 
#include<string.h>
const int MAX=1000001;
int count(char[],int*);
int main()
{
     int t,days,c,i,k;
     char p[MAX];
     scanf("%d",&t);
     while(t--)
     {
        scanf("%s",p);
        days=0,c=0;
        for(i=0;i<strlen(p);i++)
        {
            if(p[i]=='.')
            {
                k=count(p,&i);
                if(k>c)
                {
                     days++;
                     c=k;
                }
            }
       }
       printf("%d",days);
    }
    return 0;
}
int count (char str[MAX],int * x)
{
    int a=0;
    while(str[(*x)]=='.' && *x<strlen(str))
    {
        a++;
        (*x)++;
    }
    return a;
}

you forgot next line character…

printf("%d",days);

must be

printf("%d\n",days);