#include <stdio.h>
int main()
{
int t,n,i;
scanf("%d",&t);
while(t--){
scanf("%d",&n);
char arr[n];
int count=0;
scanf("%s",&arr);
for(i=0;i<strlen(arr);i++){
if(arr[i]=='0')
count++;
}
printf("%d\n",count);
}
return 0;
it is working for 1st test case .
and if i use char[100000] i.e. if i will fix the size of array it is working for all the test cases.
plzzz check the ques in hackerearth.com once.