I seriously doubt the author will care if you share a code snippet you have a question about from a 15 year old book on a programming forum (which should constitute fair use,) particularly considering the code used to be hosted online (although the link appears to be broken now.)
Yes exit the loop if the count gets to big, however n increments in a prior loop and n is the number of times it incremented and another operand/operator is added to a queue.
The thing is n can be any number 1,2,3,4,... etc. If n is an odd number there will be a .5 truncated. i.e. 3/2-1 = 0.
So I don't know perhaps there was supposed to be another n variable somewhere, not certain?
if n is 4 expression is 1 if n is 6 expression is 2. I just don't understand the relationship between count and n.
The only other info is in the description that there is one more operand than there is operators.
The loop that iterates n is reading one character at a time in PREFIX where the character is either a operator/operand.
The objective is to turn PREFIX into INFIX.
Where prefix has the operators in front of the operands and infix is typical notation using parenthesis.
Well the program is very light font and I'll try to find a way to attach it.
Really this should maybe be sufficent because these two places are the only places that mention the variable n and count other than intializations.
I know it's not a whole program, but perhaps some people like solving puzzles :)