Question: Convert the recursive function to a loop void recFun (int x) { if (x > 0) { cout < < x % 10 < <
void recFun (int x) { if (x > 0) { cout < < x % 10 < < recFun (x / 10); } else if (x != 0) cout < < x < < endl; } What is the output of the following statements? (4, 6) a. recFun (258); b. recFun (7) ; c. recFun (36); d. recFun (-85);
Step by Step Solution
3.41 Rating (148 Votes )
There are 3 Steps involved in it
Convert the recursive function into a loop using While loop void recFunint ... View full answer
Get step-by-step solutions from verified subject matter experts
