please correct in this code only
Please help correct my code as it is not showing count
Hi @harryson
You are getting wrong answer because you are declaring int c in subsequence() function which remains in the local scope of that function but when you try to print c in the main then you are getting 0 as output, so to correct it you need to declare c as global variable then you will get the desired output. And also as you are getting sub sequences in reverse order so instead of printing string, push it into stack and then in the int main print all the elements of the stack.
Here is your corrected code :
If your doubt is clear then mark it as resolved.