What is wrong with my code?

Longest Palindromic Substring
Link to code->https://ide.codingblocks.com/s/643354

hi @ikshuldureja130
is there still anything as I can see that u have successfully submitted the code and gained full points… if u still face any difficulty then do let me know…

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

No actually I have used DP method in submission but code given in the link (which considers ever char as centre of substring and count length of palindrome) is not working when i submit that for the given problem.
Can you please check the code in the link given and let me know my mistake?

Pls explain ur logic… using do is only the efficient way of solving this problem

here i am trying to implement this logic