<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META content="text/html; charset=ISO-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16421"></HEAD>
<BODY bgColor=#ffffff text=#000000>
<DIV><FONT size=2 face=Arial>Hi all!</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>I have never taught SD. Stopped with CS way back.
This has sent me way back to old texts - 70s and 80s</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>How about we ignore the bold entries in the
original question and read it to mean that the stack is</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>92</FONT></DIV>
<DIV><FONT size=2 face=Arial>75</FONT></DIV>
<DIV><FONT size=2 face=Arial>23</FONT></DIV>
<DIV><FONT size=2 face=Arial>83</FONT></DIV>
<DIV><FONT size=2 face=Arial>52</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>and the Top-of-stack pointer = 1, ie the value
52.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>This is what the question seems to
say.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>We then proceed through the steps as given in the
question</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Start Push (23)
Push (18) Pop Push (75)
Push (92) Push (47)</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>
<DIV><FONT size=2 face=Arial>92
92 92 92 92
92
*47</FONT></DIV>
<DIV><FONT size=2 face=Arial>75
75 75
75 75
*92
92</FONT></DIV>
<DIV><FONT size=2 face=Arial>23
23 *18 18 *75
75
75 </FONT></DIV>
<DIV><FONT size=2 face=Arial>83
*23 23 *23
23 23
23</FONT></DIV>
<DIV><FONT size=2 face=Arial>*52
52 52
52
52 52
52</FONT></DIV>
<DIV> </DIV>
<DIV>Where * indicates the top-of-stack pointer</DIV>
<DIV> </DIV>
<DIV>So where is the problem? Except perhaps in the way the question has been
written.</DIV>
<DIV> </DIV>
<DIV>Robert Hind (Semi-retired) OOF, GOM<BR>Ashwood and Traralgon<BR><A
href="mailto:robert@yinnar.com">robert@yinnar.com</A></DIV>
<DIV> </DIV>
<DIV> </DIV></FONT></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=mikebr@tpg.com.au href="mailto:mikebr@tpg.com.au">Mike Brookes</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=sofdev@edulists.com.au
href="mailto:sofdev@edulists.com.au">Year 12 Software Development Teachers'
Mailing List</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Sunday, May 01, 2011 4:56 PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Year 12 SofDev] Sample Exam
Questions</DIV>
<DIV><BR></DIV>G'Day again<BR><BR>Whilst 'tis true that this question on the
end of year exam would unduly stress the little dears, to play devil's
advocate, it does have a useful function as a sample to provoke discussion
about what assumptions must be made. i.e. for the question to have a non
trivial answer, what assumptions are necessary? <BR><BR>Firstly the memory
locations used for the stack do not have to be initialised to 0 or any other
value when the stack is created. The pointer is the only thing that must be
initialised.<BR><BR>If you assume the stack starts at 1 instead of 0, then the
stack will not be full after step 6 reducing the value of the
question.<BR><BR>I also assumed that the bottom two values were in bold for a
purpose, the most obvious (at least to me) being that they were valid existing
members of the stack. <BR>At the start of the question the stack is not full,
the TOS pointer is 1, the stack would be full when it reaches 4, so the
non-bold values were from previous uses of the stack. NB. a pop does not
delete the value from the stack, it just changes the TOS pointer.<BR><BR>It
may well be that a different set of assumptions will produce a meaningful
answer, these were the first consistent set I thought of.<BR><BR>If you assume
an empty stack at the start then, given that the pointer is 1 at the start of
the question, the TOS pointer must point to the next available location
(closer to convention) and the numbering must start at 1 instead of 0.
In this case the stack is not full after step 6 so another push step would be
needed in the question.<BR><BR>
<TABLE class=MsoNormalTable border=0 cellSpacing=0 cellPadding=0 width=817>
<TBODY>
<TR>
<TR style="MIN-HEIGHT: 15.75pt; HEIGHT: 15.75pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15.75pt; PADDING-LEFT: 0cm; WIDTH: 26pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=35><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 68pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=91><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 23pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=31><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 93pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=124><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 22pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=29><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 23pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=31><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 23pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=31><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 48pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=64><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 48pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=64><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 48pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=64><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 48pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=64><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 48pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=64><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 48pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=64><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 48pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=64><BR></TD></TR>
<TR style="MIN-HEIGHT: 15.75pt; HEIGHT: 15.75pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15.75pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; BORDER-TOP: medium none; BORDER-RIGHT: 1pt solid; PADDING-TOP: 0cm"
colSpan=7>
<P class=MsoNormal>Stack at start and after each step</P></TD></TR>
<TR style="MIN-HEIGHT: 15.75pt; HEIGHT: 15.75pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15.75pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Step</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Function</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Top</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Output</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Start</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Step 1</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Step 2</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Step 3</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Step 4</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Step 5</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Step 6</P></TD></TR>
<TR style="MIN-HEIGHT: 15pt; HEIGHT: 15pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>1</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Push (23)</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>2</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Item added (23)</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="BORDER-BOTTOM: 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0cm"
rowSpan=5>
<P class=MsoNormal>Stack position</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>5</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>92</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>92</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>92</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>92</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>92</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>92</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>92</P></TD></TR>
<TR style="MIN-HEIGHT: 15pt; HEIGHT: 15pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>2</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Push (18)</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal> 3</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Item added (18)</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>4</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>75</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>75</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>18</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>18</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>75</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>75</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>47</P></TD></TR>
<TR style="MIN-HEIGHT: 15pt; HEIGHT: 15pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>3</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Pop</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>2</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Item removed (18)</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>3</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>23</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>23</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>23</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>23</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>23</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>92</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>92</P></TD></TR>
<TR style="MIN-HEIGHT: 15pt; HEIGHT: 15pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>4</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Push (75)</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal> 3</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Item added (75)</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>2</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>83</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>83</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>18</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>18</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>75</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>75</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>75</P></TD></TR>
<TR style="MIN-HEIGHT: 15.75pt; HEIGHT: 15.75pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15.75pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>5</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Push (92)</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>4</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Item added (92)</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>1</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>52</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>23</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>23</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>23</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>23</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>23</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>23</P></TD></TR>
<TR style="MIN-HEIGHT: 15.75pt; HEIGHT: 15.75pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15.75pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>6</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Push (47)</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>5 <BR></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Item added (47)<BR></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD></TR>
<TR style="MIN-HEIGHT: 15.75pt; HEIGHT: 15.75pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15.75pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Top</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>1</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>2</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>3</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>2</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>3</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>4</P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>5</P></TD></TR></TR></TBODY></TABLE><BR>One would hope that a
"real" question would at least have numbered the stack positions and provided
a key to explain what the bold signified. A question to sort sheep from
goats????????????<BR><BR>Mike<BR>
<P style="TEXT-ALIGN: right" class=MsoNormal align=right>1</P>On 1/05/2011
12:12 AM, Kevork Krozian wrote:
<BLOCKQUOTE cite=mid:000c01cc0740$a65c4cf0$f314e6d0$@com.au type="cite">
<META name=Generator
content="Microsoft Word 12 (filtered medium)">
<STYLE>@font-face {
        font-family: Cambria Math;
}
@font-face {
        font-family: Calibri;
}
@font-face {
        font-family: Tahoma;
}
@page WordSection1 {size: 612.0pt 792.0pt; margin: 72.0pt 72.0pt 72.0pt 72.0pt; }
P.MsoNormal {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
LI.MsoNormal {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
DIV.MsoNormal {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.EmailStyle17 {
        FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d; mso-style-type: personal-reply
}
.MsoChpDefault {
        mso-style-type: export-only
}
DIV.WordSection1 {
        page: WordSection1
}
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<DIV class=WordSection1>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt">Hi
Mark and Mike,<O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt"><O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt">
I am a little late on the scene but have to support Mark
here.<O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt">The
question on stacks is more a puzzle than a reasonable problem for a student
to solve in limited time.<O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt">The
question begins with a picture of a stack to consider....... which suggests
the starting position of the problem. Apparently it is in a full state ....
and that can be determined from ?????<O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt">Then,
a push (23) is introduced. Hang on, I thought we had a stack to consider
with 5 elements. Are we adding another 23 or picking up half way through the
introduced stack ? <O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt">Where
is it suggested that the introduced stack is in a “stack full” state ?
<O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt">The
push and pop operations are not the problem, just the starting position of
the problem. When is the beginning is what got me first. The bold
items were no help as I didn’t consider them to be
significant.<O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt">Also,
the item Top (1) might mean top of stack to the writer, but only adds to the
confusion as it is not obvious it means the top of the stack when we start
with a stack with 5 elements. <O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt"><O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt">I
have gone through my 2<SUP>nd</SUP> year Data Structures textbooks and have
a strong recollection of the 1982 exams I did ( why wouldn’t I ?? ) on
stacks and data structures and there was always a pointer or arrow (with a
value in a variable ) showing the top of a stack at the beginning of a
question and the requirement was to draw the stack through the various
states after push and pop functions. Apart from that we either have empty or
full states. <O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt"><O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt">I
can’t see how this question would have helped in any way to show
student’s understanding of a stack and its functions.<O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt"><O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt">Kind
Regards<O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt"><O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt">Kevork
Krozian<O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt">Edulists
Creator Administrator<O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt"><A
class=moz-txt-link-abbreviated
href="http://www.edulists.com.au">www.edulists.com.au</A><O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt">tel:
0419 356 034<O:P></O:P></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: rgb(31,73,125); FONT-SIZE: 11pt"><O:P></O:P></SPAN></P>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(181,196,223) 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"
lang=EN-US>From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt" lang=EN-US> <A
class=moz-txt-link-abbreviated
href="mailto:sofdev-bounces@edulists.com.au">sofdev-bounces@edulists.com.au</A>
[<A class=moz-txt-link-freetext
href="mailto:sofdev-bounces@edulists.com.au">mailto:sofdev-bounces@edulists.com.au</A>]
<B>On Behalf Of </B>Mark KELLY<BR><B>Sent:</B> Wednesday, 27 April 2011 2:36
PM<BR><B>To:</B> Year 12 Software Development Teachers' Mailing
List<BR><B>Subject:</B> Re: [Year 12 SofDev] Sample Exam
Questions<O:P></O:P></SPAN></P></DIV>
<P class=MsoNormal><O:P></O:P></P>
<P style="MARGIN-BOTTOM: 12pt" class=MsoNormal>Thanks for the bone,
Mike. Woof! It finally let me work out the many assumptions
underlying the question: and after all that, I'm not wagging my
tail.<BR><BR>I think the question is far from clear, and I doubt students
would make much of it in a real exam.<BR> <BR>- It does not, for
example, say that the stack is zero-based. If one assumes (as I did)
that the stack indexing starts at 1, the whole thing changes and nothing
makes sense.<BR>- It does not indicate what the mysterious bolding of the
bottom 2 items is meant to represent. If the examiners invent their
own conventions, they should explain them to us.<BR>- It does not tell us
that the stack pointer in updated <B>before</B> a push/pop instead of being
changed afterwards, as often happens. Again, this changes
everything.<BR>- One has to realise that the stack is expanding from the
bottom and not from the top. Stacks are often represented growing in either
direction.<BR><BR>When it comes to real-world stack implementation, there
are so many different options such as these that I found the question
mind-boggling while I went through the permutations of possible
readings.<BR><BR>Grrr.<O:P></O:P></P>
<DIV>
<P class=MsoNormal>On 21 April 2011 14:45, Mike Brookes <<A
href="mailto:mikebr@tpg.com.au"
moz-do-not-send="true">mikebr@tpg.com.au</A>> wrote:<O:P></O:P></P>
<DIV>
<P class=MsoNormal>Hi Mark et Al<BR><BR>For the question to make sense one
has to make the assumption that the stack positions start at the bottom with
position zero and go up to position 4 which is the top of the stack. At the
start the bottom two (in bold on the PDF) are valid, hence the top of stack
pointer showing 1. <BR><BR>Below is the completed table and the stack at the
start and after each step:<O:P></O:P></P>
<TABLE style="WIDTH: 612.75pt" class=MsoNormalTable border=0 cellSpacing=0
cellPadding=0 width=817>
<TBODY>
<TR style="MIN-HEIGHT: 15.75pt; HEIGHT: 15.75pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15.75pt; PADDING-LEFT: 0cm; WIDTH: 26pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=35><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 68pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=91><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 23pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=31><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 93pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=124><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 22pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=29><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 23pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=31><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 23pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=31><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 48pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=64><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 48pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=64><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 48pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=64><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 48pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=64><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 48pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=64><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 48pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=64><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 48pt; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"
width=64><BR></TD></TR>
<TR style="MIN-HEIGHT: 15.75pt; HEIGHT: 15.75pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15.75pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; BORDER-TOP: medium none; BORDER-RIGHT: 1pt solid; PADDING-TOP: 0cm"
colSpan=7>
<P class=MsoNormal>Stack at start and after each
step<O:P></O:P></P></TD></TR>
<TR style="MIN-HEIGHT: 15.75pt; HEIGHT: 15.75pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15.75pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Step<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Function<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Top<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Output<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Start<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Step 1<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Step 2<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Step 3<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Step 4<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Step 5<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Step 6<O:P></O:P></P></TD></TR>
<TR style="MIN-HEIGHT: 15pt; HEIGHT: 15pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>1<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Push (23)<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>2<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Item added (23)<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="BORDER-BOTTOM: 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0cm"
rowSpan=5>
<P class=MsoNormal>Stack position<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>4<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>92<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>92<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>92<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>92<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>92<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>92<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>92<O:P></O:P></P></TD></TR>
<TR style="MIN-HEIGHT: 15pt; HEIGHT: 15pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>2<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Push (18)<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal><O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Item added (18)<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>3<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>75<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>75<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>18<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>18<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>75<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>75<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>75<O:P></O:P></P></TD></TR>
<TR style="MIN-HEIGHT: 15pt; HEIGHT: 15pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>3<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Pop<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>2<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Item removed (18)<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>2<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>23<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>23<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>23<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>23<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>23<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>23<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>23<O:P></O:P></P></TD></TR>
<TR style="MIN-HEIGHT: 15pt; HEIGHT: 15pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>4<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Push (75)<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal><O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Item added (75)<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>1<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>83<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>83<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>83<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>83<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>83<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>83<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>83<O:P></O:P></P></TD></TR>
<TR style="MIN-HEIGHT: 15.75pt; HEIGHT: 15.75pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15.75pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>5<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Push (92)<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>4<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Item added (92)<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>0<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>52<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>52<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>52<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>52<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>52<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>52<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>52<O:P></O:P></P></TD></TR>
<TR style="MIN-HEIGHT: 15.75pt; HEIGHT: 15.75pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15.75pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>6<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Push (47)<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal><O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Stack full<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD></TR>
<TR style="MIN-HEIGHT: 15.75pt; HEIGHT: 15.75pt">
<TD
style="PADDING-BOTTOM: 0cm; MIN-HEIGHT: 15.75pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm"><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P class=MsoNormal>Top<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>1<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>2<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>3<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>2<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>3<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>4<O:P></O:P></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; HEIGHT: 15.75pt; PADDING-TOP: 0cm">
<P style="TEXT-ALIGN: right" class=MsoNormal
align=right>4<O:P></O:P></P></TD></TR></TBODY></TABLE>
<P class=MsoNormal><BR><SPAN style="COLOR: rgb(136,136,136)">Mike Brookes
<BR>Semi retired gentleman from Copperfield College</SPAN><O:P></O:P></P>
<DIV>
<P class=MsoNormal><BR><BR>On 21/04/2011 1:35 PM, Mark KELLY wrote:
<O:P></O:P></P>
<P class=MsoNormal>Would someone be kind enough to throw me a bone about the
stack question - Q3?<BR><BR>I thought I knew stack implementation from my
assembly language days with Z80... this question feels like walking into
someone's half-finished thought process. I'm really confused about
this.After half an hour of conjecture, I’ve tried four times to ask a series
of sensible questions to make sense of it, and have failed every time.
<O:P></O:P></P>
<P class=MsoNormal><O:P></O:P></P>
<P class=MsoNormal>The only apparent answer involves time travel, reversed
arrays, irrelevant stack pointers and bogus bolding of stack items.
The relationship between the stack and the table is only the beginning of
the problem...<O:P></O:P></P>
<P class=MsoNormal><O:P></O:P></P>
<P class=MsoNormal>I’d be delighted if anyone could walk me through
this...<O:P></O:P></P>
<P class=MsoNormal><O:P></O:P></P>
<P class=MsoNormal>Regards<O:P></O:P></P>
<P class=MsoNormal>Mark<O:P></O:P></P>
<P class=MsoNormal><O:P></O:P></P>
<P class=MsoNormal><O:P></O:P></P></DIV></DIV>
<P class=MsoNormal><BR>_______________________________________________<BR><A
href="http://www.edulists.com.au" target=_blank
moz-do-not-send="true">http://www.edulists.com.au</A> - FAQ, Subscribe,
Unsubscribe<BR>IT Software Development Mailing List kindly supported
by<BR><A href="http://www.vcaa.vic.edu.au" target=_blank
moz-do-not-send="true">http://www.vcaa.vic.edu.au</A> - Victorian Curriculum
and Assessment Authority and<BR><A
href="http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html"
target=_blank
moz-do-not-send="true">http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html</A><BR><A
href="http://www.vitta.org.au" target=_blank
moz-do-not-send="true">http://www.vitta.org.au</A> - VITTA Victorian
Information Technology Teachers Association Inc<O:P></O:P></P></DIV>
<P style="MARGIN-BOTTOM: 12pt" class=MsoNormal><BR><BR clear=all><BR>--
<BR>Mark Kelly<BR>Manager of ICT, Reporting, IT Learning Area<BR>McKinnon
Secondary College<BR>McKinnon Rd McKinnon 3204, Victoria,
Australia<BR>Direct line / Voicemail: +613 8520 9085, Fax +613 9578
9253<BR><A href="mailto:kel@mckinnonsc.vic.edu.au" target=_blank
moz-do-not-send="true">kel@mckinnonsc.vic.edu.au</A><BR>VCE IT Lecture
Notes: <A href="http://vceit.com" target=_blank
moz-do-not-send="true">http://vceit.com</A><BR>Moderator: IT Applications
Edulist<BR><BR>All generalisations are false, except this
one.<O:P></O:P></P></DIV><PRE wrap=""><FIELDSET class=mimeAttachmentHeader></FIELDSET>
_______________________________________________
<A class=moz-txt-link-freetext href="http://www.edulists.com.au">http://www.edulists.com.au</A> - FAQ, Subscribe, Unsubscribe
IT Software Development Mailing List kindly supported by
<A class=moz-txt-link-freetext href="http://www.vcaa.vic.edu.au">http://www.vcaa.vic.edu.au</A> - Victorian Curriculum and Assessment Authority and
<A class=moz-txt-link-freetext href="http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html">http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html</A>
<A class=moz-txt-link-freetext href="http://www.vitta.org.au">http://www.vitta.org.au</A> - VITTA Victorian Information Technology Teachers Association Inc</PRE></BLOCKQUOTE><BR>
<P>
<HR>
<P></P>_______________________________________________<BR>http://www.edulists.com.au
- FAQ, Subscribe, Unsubscribe<BR>IT Software Development Mailing List kindly
supported by<BR>http://www.vcaa.vic.edu.au - Victorian Curriculum and
Assessment Authority
and<BR>http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html
<BR>http://www.vitta.org.au - VITTA Victorian Information Technology
Teachers Association Inc</BLOCKQUOTE>
<P>
<HR>
<P></P>_______________________________________________<BR>http://www.edulists.com.au
- FAQ, Subscribe, Unsubscribe<BR>IT Software Development Mailing List kindly
supported by<BR>http://www.vcaa.vic.edu.au - Victorian Curriculum and Assessment
Authority
and<BR>http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html
<BR>http://www.vitta.org.au - VITTA Victorian Information Technology
Teachers Association Inc</BODY></HTML>