Why am i getting wrong answer for this code?
#include <iostream>
using namespace std;
int main()
{
int t,n;
scanf("%d",&t);
while(t--)
{
scanf("%d",&n);
char s[n];
for(int i=0;i<n;i++)
{
cin>>s[i];
}
int c=0;
for(int i=0;i<n;i++)
{
if(s[i]=='0' && s[i-1]!='1' && s[i+1]!='1')
{
c++;
}
}
printf("%d\n",c);
}
return 0;
}