please find the error

I am not able to find the error in this code… I am getting the answers write for the test cases but on submission it is showing wrong answer…The problem is Little elephants and bombs from easy section…
please help
#include
using namespace std;
int main()
{
int T,N,i,j,c[102];
char bld[101][1004];
cin>>T;
for(j=0;j<T;j++)
{
c[j]=0;
cin>>N;

cin>>bld[j];
// is assigned to the buildings that will be blasted//
for(i=0;i<N;i++)
{

if(i>0&&i<N-1)
{
    if(bld[j][i]=='1')
    {
        bld[j][i-1]='8';
        bld[j][i+1]='8';
        bld[j][i]='8';
    }
}
else
{
    if(bld[j][0]=='1')
    {

    bld[j][0]='8';
    bld[j][1]='8';
    }

if(bld[j][N-1]=='1')
{
    bld[j][N-1]='8';
    bld[j][N-2]='8';
}
}

}
for(i=0;i<N;i++)
{
if(bld[j][i]==‘0’)
{

c[j]++;
}

}

}
for(i=0;i<T;i++)
cout<<c[i]<<endl;
}