0 votes 0 votes Predict the output of the following program. Void func (int n) { if (n > o) { func (n – 2); Print f ("% d", n – 1); Fun (n – 2); } } if 10 is passed as literal value : (1) 975921 (2) 951351 (3) 1315131713151317 (4) 131513713151319131513171315131 Your Answer: 3 Correct Answer: 4 Status: incorrect vishwa ratna asked Jan 17, 2017 vishwa ratna 196 views answer comment Share Follow See 1 comment See all 1 1 comment reply teja1521 commented Mar 13 reply Follow Share option 4 is correct they missed printing 1 in options before 7. 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes Yes 4th option is correct, There has to be 9 in the middle as we have passed 10 initially so one recursion is for func(10-2) than printf(10-1) than same recusrion for func(10-2) hence option 4th. robin sharma answered Jan 17, 2017 robin sharma comment Share Follow See all 0 reply Please log in or register to add a comment.