hole in the text

The following code runs well in codeblocks but here its showing error(runtime):
#include
#include <string.h>
using namespace std;

int main()
{
int i,j,k,c=0; int v[100];
char str[100];
cin>>i;

for(j=0;j<=i-1;j++)
{
cin>>str;

    for(k=0;k<=strlen(str);k++)
    {
         char t=str[k];

         if ((t=='A')||(t=='D')||(t=='O')||(t=='P')||(t=='Q')||(t=='R'))
             c++;
         if(t=='B')
            c+=2;
    }

    v[j]=c;

    c=0;
 }

for(j=0;j<=i-1;j++)
cout<<v[j]<<"\n";

 return 0;

 }

Hi Abhinav, runtime is caused because you were trying to access invalid memory reference or array element out of bound. I just removed equal sign in the for loop condition and the solution got accepted. Check here.