729 views
2 votes
2 votes

My doubt is, In the stack, we will push [main()->PTN(3)->PTN(2)->PTN(1)->PTN(0)]       PTN = printTwoNumbers function call

Then according to answer PTN(0) won't pushed into stack, but at least to check if and return we should push it. What's the correct.

My answer is 5, given is 4

Please log in or register to answer this question.

Related questions

2 votes
2 votes
2 answers
1
eyeamgj asked Jun 18, 2018
2,223 views
To remove recursion from a program we have to use which of the following data structure?arraystackqueuelist
0 votes
0 votes
1 answer
3
Abhrajyoti00 asked Oct 29, 2022
742 views
Can there be “Stack Overflow” in Linked list Implementation of stack? If Yes, how?