Https://ide.codingblocks.com/s/239736

it is my code it is not giving perfect answer,please help

@agarwalarjit.agarwal
There is mistake in line 28, it should be print_combinations(a,n,target,sum,output,j+1,k+1);
Also now your code prints all possible solutions(some may repeat) but you have to print only distinct solutions. So instead of printing, store it in some set and print it once your code return back to main function

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.