Pls help me to debug the code.The given solution for this qstn is not a recursive one

//#include<bits/stdc++.h>
#include
#include
using namespace std;

bool palindrome(char a[],int strt,int end)
{
bool p;
if(strt==end)
{
p=true;
}

else if(a[strt]==a[end])
	{
		
		p=palindrome(a,strt+1,end-1);
	}
	else
	{
		p=false;
	}
return p;

}

int main()
{
int n;
cin>>n;
cin.get();
//char *a=new char[n];
char a[n];
cin>>a;
int strt=0,end=n-1;

bool p=palindrome(a,strt,end);
if(p==0)
cout<<"false";
else
cout<<"true";

}

hello @Senjuti256
add one more base case.
if(start>end)
return false;

still test case 0 and 1 are not getting passed