THIS CODE IS FAILING TWO TEST CASES WHAT IS WRONG HERE IN THIS CODE??
#include<bits/stdc++.h>
using namespace std;
int main()
{
char s[101],l,c;
int a[256]={0};
cin>>s;
l=strlen(s);
for (int i=0;i<l;i++)
{
a[s[i]]++;
}
for(int i=0;i<256;i++)
{
if(a[i]!=0)
{
c=char(i);
cout<<c<<a[i];
}
}
return 0;
}