How to print in a reverse order


Hi, the code is correct but can anyone tell me how to print the output in a reverse order using this code only?

hi @Parikalp10 are you sure this is the correct code? No strings are being printed when I ran this…
Anyhow, currently, you are firstly “rejecting” a character and calling the function, and then “choosing” it and calling the function again.
If you reverse this order, ie first “choose” the curr character and then “reject” it, the order of final strings will also change.

sorry this is the correct code https://ide.codingblocks.com/s/277242

@Parikalp10 https://ide.codingblocks.com/s/277245 is this what you need?

yes thank you so much

1 Like

@Parikalp10 please mark the doubt as resolved