Lecture 4

Note that the program does not end here take a look

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ckward(S,1) 20 Writebackward(S,0) will do NOTHING. Note that we have already written TAC to the screen. Note that the program does not end here. Take a look back at the code of writebackward( ). You see that NOTHING is done in writebackward( ) AFTER the recursive call. 21 writebackward( ) Return Path • writebackward(S,0) returns to writebackward(S,1) • writebackward(S,1) has nothing left to do, returns to its caller, writebackward(S,2). • writebackward(S,2) has nothing left to do, returns to its caller, writebackward(S,3). • When writebackward(S,3) returns, the program is finished. 23 22...
View Full Document

Ask a homework question - tutors are online