I am trying to find out the length of an string using strlen() but it seems to not working properly my code is below with the input i given
#include
using namespace std;
int main()
{
long long T,a,b,c,e;
scanf("%lld",T);
long long M[T];
for(a=1;a<=T;a++)
{
scanf("%lld",&M[a]);
c=M[a];
long long l[c],d[c],r[c];
for(b=1;b<=c;b++)
{
scanf("%lld%lld",&l[b],&d[b]);
r[b]=l[b]*d[a];
e=strlen(r);
printf("%d",e);
}
}
return 0;
}
Input
1
1
100 100
Can you tell me where i am going wrong?