Please tell me the problem bcoz program is doing what was asked in problem.

#include <stdio.h>

int main(void) {

int T,N,u=0,j,k;

scanf("%d",&T);

for(j=0;j<T;j++)

{

scanf("%d",&N);

int s[N];

for(k=0;k<N;k++)

scanf("%d",&s[k]);

for(k=0;k<N;k++)

{if(k==0&&s[k+1]==0&&s[k]==0)

{u+=1;s[k]=1;}

else if(k>0&&k<N-1)

{if(s[k-1]==0&&s[k+1]==0&&s[k]==0)

{u+=1;s[k]=1;

}}

else if(k==N-1)

if(s[k-1]==0&&s[k]==0)

{u+=1;s[k]=1;}

}

printf("%d \n",u);u=0;

}

return 0;

}