Print all triplets that sum to target;1 wrong ans on submission

please tell me what test case my code isnt able to handle
am getting one wrong test case on submission
IT WORKS PERFECTLY FINE
I HAVE GIVEN EXPLANATION FOR EACH STEP IN MY CODE
my code
https://ide.codingblocks.com/s/41245

question link;
https://hack.codingblocks.com/contests/c/512/214

Your code is working fine.
But there is no need of sorting the array in descending order.

Actually, you didn’t comprehend the question right. You overthought about it.
In this you simply had to sort in ascending order and then check the required condition of triplet.
You can refer my code https://ide.codingblocks.com/s/41248