Confusion in printing


in this the output is all possibilities plus -1 also is coming and in this
https://ide.codingblocks.com/s/150943
(change is shown by comment as only change)the output is coming but backtracking is not going proper …please explain why is it happening ???

Kartik, in which code should I refer for changes, plz specify clearly, since I m not able to get ur question,

mam…please see both the codes to compare what is the slight change i have made …i have written the comment as "change"where i have made the change so that your time is saved

mam please see my codes and tell my mistake

Yes Kartik, I check and let u know.

mam… have you checked my code??if yes…then please tell my mistakes …its already been a week