How to print it in reverse order?

https://ide.codingblocks.com/s/111222 Sir, here I have printed all possible combinations. Also, I tried using a stack to reverse the order. It did not work. Please see that and let me know how can I reverse the order.

hey @samriddhi.srivastava2017, vector should be passed with call by reference.

https://ide.codingblocks.com/s/111245 the stack is not storing values. please check

hey @samriddhi.srivastava2017, I used string datatype for vector and it is storing the content perfectly.

Yes , it worked. But why wasn’t it working with char* ?

hey @samriddhi.srivastava2017, that was char pointer and char pointer usually don’t work with cout.