Recursion-Duplicate character formatting

One test case is not passes. Which case am I missing

#include
#include
#include <math.h>
using namespace std;

void format(char* a, int l)
{
if(l==strlen(a))
return;

if(a[l]==a[l+1])
{
    for(int i=strlen(a);i>l;i--)
    {
	    a[i]=a[i-1];
    }
    a[l+1]='*';
}
format(a,l+1);

}
int main()
{
char a[200];
cin>>a;
format(a,0);
cout<<a;
return 0;
}

please save your code at coding blocks ide save it and send the generated link

so that we can check and modify your code

I’ve given the llink of my code.Please see which case I’m missing

if(l==strlen(a)-1)
return;
do this change
and check again
i do this because if string is “Hello” length is 5 but you have to stop at 4

I did the change in if statement still one test case fails

Problem was due to size of character array, now sorted, thanks