All pastes #19435 Raw Edit

Untitled

public text v1 · immutable
#19435 ·published 2005-08-06 03:45 UTC
rendered paste body

I) (5) The following pseudo-code uses an array of 6 strings containing the following values. Analyzing the pseudo-code to determine the output generated. Hint: make a column for each variable and record the values stored in the variable as you carefully walkthrough the code doing everything the code tells you to do.

Joe
Jill
Andy
Bob
Tom
Sue

Begin
Store the first array element in a working string variable – HoldString

Initialize an integer variable to be used as an Index to 0 - Index

Loop as long as the Index variable < 5
		If the value stored in the array element pointed to by the Index is less than the value stored in the HoldString variable
                     		Save the value stored in the array element pointed to by the Index in the HoldString variable
			Save the current value of the Index in a hold field - HoldPosition
		End If
End Loop

Display HoldString & “ in position “ & HoldPosition
End